resources/qa/issues/update (post)
Permits to add, update and delete QA issues of individual segments. Examples:
- Add a new issue to a segment translation. Specify severity and reason.
- Update severity of an issue from Error to Warning
- Delete a specific issue or all issues of a translation
- Add a comment to an issue Â
URL
(POST) /resources/qa/issues/update
PARAMETERS
The request body is a JSON object with these parameters:
scope | Mandatory. See Scope (Object) This method supports Project and Job scopes only. | object, Mandatory |
commands | An array of update instructions, see table below. | object[], Mandatory |
adjustTextStatus | Optional, default is false. When true then the system adjusts the text's status according to the issues after the change:
| bool, Optional |
Each element in commands has these properties:
sid | The segment ID to update. | int, Mandatory |
locale | The locale of the text to update. | string, Mandatory |
action | The type of change, any of:
| string, Mandatory |
* | Other properties depend on the action, see below. |
Action "Add"Â command properties:
severity | Any of these numeric values:
| int, Mandatory |
description | Mandatory description for the issue | string, Mandatory |
ruleId | Optional QA rule ID. Should generally be left null. When not specified the ruleId will be set to 1000, which is a proxy for issues not produced by a Wordbee QA process. You can use any non Wordbee IDs as long as those are above 1000. | int?, Optional |
dismissed | Optional, default is false. If true then the issue is considered "dismissed" such as with false positives. | bool, Optional |
comments | Optional, additional comments to include with the issue. | string, Optional |
Action "Update"Â command properties:
index | To locate the specific issue in the text. This is a zero-based index (0 = first issue on text).
| int?, Optional |
severity | If null or missing then property will not be updated. To change severity use any of these numeric values: 0 - Information, 1 - Warning, 2 - Error | int?, Optional |
description | If null or missing then property will not be updated. To change the reason/description of the issue. | string?, Mandatory |
ruleId | Optional QA rule ID. Should generally be left null. | int?, Optional |
dismissed | If null or missing then property will not be updated. To set or reset the dismissed flag. | bool?, Optional |
comments | If null or missing then property will not be updated. To set comments. Put an empty string "" to clear an existing comment. | string?, Optional |
Action "Delete"Â command properties:
index | Option:
| int?, Optional |
RESULTS
The method returns basic statistics on the total updates:
- Total segments selected (these are all the segments referenced in the commands list)Â
- Total segments changed (segments where a command triggered an actual change)
- Total issues changed: Total number of added, removed or updated issues.
Example:
{ "segments": 3, "changedSegments": 3, "changedIssues": 5 }
MULTIPLE ACTIONS
You can submit multiple commands like several updates, deletes, adds in one or multiple segments without issues.
Suppose you have a text with 2 issues and you submit these commands:
- Delete first issue (index 0)
- Amend second issue (index 1)
This will perfectly work!
The system makes sure that commands are handled so that indexes do not shift: The first command deletes the first issue but the second command (index 1) will still hit the issue intended.
EXAMPLES
Updating 2 specific issues in segment 1000 and all the issues in segment 2000:
{ "scope": { "type": "Project", "projectid": 4332 }, "commands": [ { "sid": 1000, "locale": "fr", "index": 0, "action": "Update", "severity": 1, "comments": "For your info" }, { "sid": 1000, "locale": "fr", "index": 1, "action": "Update", "reason": "Semi colon missing }, { "sid": 2000, "locale": "fr", "index": null, "action": "Update", "comments": "I add a comment to all issued in French!" } ] }
Adding a new issue:
{ "scope": { "type": "Project", "projectid": 4332 }, "commands": [ { "sid": 1000, "locale": "fr", "action": "Add", "severity": 1, "description": "This is a warning" } ] }
Deleting the second issue in a language:
{ "scope": { "type": "Project", "projectid": 4332 }, "commands": [ { "sid": 1000, "locale": "fr", "index": 1, "action": "Delete" } ] }
Deleting all issues from 2 segments:
{ "scope": { "type": "Project", "projectid": 4332 }, "commands": [ { "sid": 1000, "locale": "fr", "action": "Delete" }, { "sid": 1001, "locale": "fr", "action": "Delete" } ] }
Copyright Wordbee - Buzzin' Outside the Box since 2008