Skip to content

feat(tasks): add support for task batches (batchId) - #263

Open
innomaxx wants to merge 1 commit into
mainfrom
feature/issue-255_tasks-batches
Open

feat(tasks): add support for task batches (batchId)#263
innomaxx wants to merge 1 commit into
mainfrom
feature/issue-255_tasks-batches

Conversation

@innomaxx

@innomaxx innomaxx commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

Closes #255

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Not ready to approve

The new batch feature isn’t fully wired through the consolidated vendor task helper methods (and corresponding tests), leaving the PR incomplete relative to #255.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

This review doesn't count toward merge requirements. Sign up for the private preview to control whether Copilot approvals count.

Pull request overview

Updates the Tasks API resource to reflect the upstream Crowdin/Crowdin Enterprise changes described in #255, including task-batch support (batchId) and the consolidated vendor task creation form.

Changes:

  • Adds batchId support to task listing and several task creation helpers (general task forms) for both Crowdin and Enterprise resources.
  • Consolidates Crowdin vendor task helpers by removing per-vendor create-form variants and introducing generic vendor-task helpers that take a free-form vendor identifier.
  • Extends task patch enums/tests to cover new editable fields (batchId, resetScope) and simplifies/removes obsolete vendor-specific enums and tests.
File summaries
File Description
crowdin_api/api_resources/tasks/resource.py Adds batchId to list/create helpers, removes per-vendor helpers, introduces consolidated vendor helpers, and exposes patch support.
crowdin_api/api_resources/tasks/enums.py Adds patch paths for batchId/resetScope and removes enums tied to the deprecated per-vendor create forms.
crowdin_api/api_resources/tasks/tests/test_tasks_resources.py Updates tests for the new params/enums and new consolidated vendor helper methods.
Review details

Suppressed comments (5)

crowdin_api/api_resources/tasks/resource.py:367

  • add_vendor_task() still doesn't forward batchId into the request body; even after adding the parameter, it will be ignored unless it's included in request_data.
                "deadline": deadline,
                "dateFrom": dateFrom,
                "dateTo": dateTo,
            },

crowdin_api/api_resources/tasks/resource.py:410

  • add_vendor_by_string_ids_task() should include batchId in the request body when provided; otherwise the new parameter (and API feature) has no effect.
                "deadline": deadline,
                "dateFrom": dateFrom,
                "dateTo": dateTo,
            },

crowdin_api/api_resources/tasks/resource.py:463

  • add_vendor_pending_task() currently ignores batchId even if added to the signature; it needs to be forwarded into the request body (ideally only when non-null).
                "vendor": vendor,
                "title": title,
                "description": description,

crowdin_api/api_resources/tasks/tests/test_tasks_resources.py:439

  • Batch support is being added, but the vendor-task tests don’t cover passing a non-null batchId through the helper into the request body. Adding batchId to one of the parametrized cases would lock in the behavior.

This issue also appears on line 600 of the same file.

                    "deadline": datetime(year=1988, month=9, day=26),
                    "dateFrom": datetime(year=1988, month=1, day=4),
                    "dateTo": datetime(year=2015, month=10, day=13),
                },
                {

crowdin_api/api_resources/tasks/tests/test_tasks_resources.py:607

  • add_vendor_pending_task should also have at least one test case that passes a non-null batchId to ensure the field is actually forwarded to the API request.
                {
                    "title": "title",
                    "precedingTaskId": 1,
                    "description": "description",
                    "vendor": "acclaro",
                    "assignees": [{"id": 1, "wordsCount": 2}],
                    "deadline": datetime(year=1988, month=9, day=26),
                },
  • Files reviewed: 3/3 changed files
  • Comments generated: 3
  • Review effort level: Lite

We're testing this review assessment. Please use 👍 or 👎 to tell us if it's correct.

Comment on lines 337 to 340
deadline: Optional[datetime] = None,
startedAt: Optional[datetime] = None,
dateFrom: Optional[datetime] = None,
dateTo: Optional[datetime] = None,
):
Comment on lines 382 to 385
deadline: Optional[datetime] = None,
startedAt: Optional[datetime] = None,
dateFrom: Optional[datetime] = None,
dateTo: Optional[datetime] = None,
):
Comment on lines 445 to 449
projectId: Optional[int] = None,
description: Optional[str] = None,
assignees: Optional[Iterable[CrowdinTaskAssignee]] = None,
deadline: Optional[datetime] = None,
):
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for task batches (batchId) and the consolidated vendor task form

2 participants