Skip to content

feat: add originalWordsCount and syncScope to Task model - #406

Merged
andrii-bodnar merged 1 commit into
crowdin:masterfrom
Selahattinozdmr:feat/task-original-words-count-sync-scope
Sep 14, 2026
Merged

andrii-bodnar merged 1 commit into
crowdin:masterfrom
Selahattinozdmr:feat/task-original-words-count-sync-scope

Conversation

@Selahattinozdmr

Copy link
Copy Markdown
Contributor

Description

Task now exposes:

  • originalWordsCount — word count preserved from task creation, even after source strings are later removed (wordsCount reflects the current count).
  • syncScope (Crowdin Enterprise only) — nullable object with syncedWords/pendingWords/skippedWords, reflecting sync state with a linked organization/project task. Null when the task is fully synced, not shared, or the counterpart is unavailable.

Scope note

The linked issue lists several other client-library updates that turn out to already be correct (or not applicable) in this codebase, so this PR only touches what actually needs to change:

  • Task.creatorId is already Long, not String.
  • Status already round-trips as a lowercase string enum (todo/in_progress/...), not an integer.
  • PatchRequest.path is a plain String, so the new /generateCostEstimate, /generateTranslationCost, /reportSettingsTemplateId patch paths for Edit Project Task (Enterprise) don't require a client change.
  • An organization-level "List Tasks" (api.tasks.getMany) endpoint isn't implemented in this client yet, so there's no separate organization-level task model to update — Task is shared by the project-tasks and user-tasks endpoints that do exist, and both pick up the new fields.

Added originalWordsCount/syncScope to the enterpriseTask.json fixture and asserted on them in addStringsBasedEnterpriseTaskTest, verified to fail to compile without the model change and pass with it.

Fixes #401

Task now exposes originalWordsCount (word count preserved from task
creation, even after source strings are later removed) and, for
Crowdin Enterprise, a nullable syncScope object (syncedWords,
pendingWords, skippedWords) reflecting sync state with a linked
organization/project task.

Task.creatorId is already Long and Status is already a string enum
in this client, so those parts of the upstream change are already
correct here. The inter-organizational task patch path is a plain
String on PatchRequest, so the new /generateCostEstimate,
/generateTranslationCost, and /reportSettingsTemplateId paths need
no client change. An organization-level "List Tasks"
(api.tasks.getMany) endpoint isn't implemented in this client yet,
so this only updates the Task model shared by the endpoints that
do exist (project tasks, user tasks).

Fixes crowdin#401
@andrii-bodnar
andrii-bodnar merged commit b4ed767 into crowdin:master Sep 14, 2026
2 checks passed
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.

Tasks API updates - syncScope, originalWordsCount, and model fixes

2 participants