Skip to main content

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
commandsAn 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:

  • If there are no more issues (dismissed ones do not count), then a red status is reset to gray.
  • If there are any issues (dismissed ones do not count), then the status will be set to red.


bool, Optional


Each element in commands has these properties:

sid

The segment ID to update.

int, Mandatory
localeThe locale of the text to update.string, Mandatory
action

The type of change, any of:

  • Add - To add a new issue to the segment and locale
  • Update - To amend issues
  • Delete - To delete issues
string, Mandatory
*Other properties depend on the action, see below.


Action "Add" command properties:

severity

Any of these numeric values:

  • 0 - Information
  • 1 - Warning
  • 2 - Error
int, Mandatory
descriptionMandatory description for the issuestring, 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
commentsOptional, 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).

  • >= 0: The index of the issue to update
  • null: The command will apply to all issues in the text (ie in the specific locale of the segment)
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
ruleIdOptional 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:

  • >= 0: The index of the issue to delete
  • null: All issues in the text are removed (ie in the specific locale of the segment)
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:

JS
{
    "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:

CODE
{
	"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:

CODE
{
	"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:

CODE
{
	"scope": { "type": "Project", "projectid": 4332 },
	"commands": [
        {
            "sid": 1000,
			"locale": "fr",
            "index": 1,
            "action": "Delete"
		}
    ]
}


Deleting all issues from 2 segments:

CODE
{
	"scope": { "type": "Project", "projectid": 4332 },
	"commands": [
        {
            "sid": 1000,
			"locale": "fr",
            "action": "Delete"
		},
        {
            "sid": 1001,
			"locale": "fr",
            "action": "Delete"
		}
    ]
}



JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.