Transitioning Work Item Statuses in Batches
Function
This API is used to transition work item statuses in batches.
Calling Method
For details, see Calling APIs.
Authorization Information
No identity policy-based permission required for calling this API.
URI
PUT /v1/ipdprojectservice/projects/{project_id}/work-item/processes/transfer-batch
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| project_id | Yes | String | Definition 32-character ID of a project, which must be unique. Obtain the value by calling the API for querying the IPD project list. The value of id in the response message body is the project ID. Constraints N/A Range A string of 32 characters consisting of letters and digits. Default Value N/A |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| is_recover | No | Boolean | Definition Whether to overwrite the corresponding field. Constraints N/A Range true: The corresponding field values in the current dialog box will overwrite the values for that field in all selected work items. false: The fields of the selected work items (except for Current Owner) that already have a value will remain unchanged and will not be overwritten by the values from the current dialog box. Default Value false |
Request Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| X-Auth-Token | Yes | String | Definition User token. Obtain a token by calling the IAM API for obtaining a user token. The value of X-Subject-Token in the response header is the user token. Constraints N/A Range 10 to 32,768 characters Default Value N/A |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| id | No | String | Definition Unique ID of a work item. You can obtain the value from the Querying Work Items or Querying Tree-shaped Work Items API. The value is id in the response body. Constraints N/A Range N/A Default Value N/A |
| issue_category | Yes | String | Definition Work item type. Constraints N/A Range RR, IR, AR, SR, Bug, FE, Task, US, Epic, and SF Default Value N/A |
| flow_code | Yes | String | Definition Work item transition code. It can be obtained by calling the API for querying work item process information. The next_flow array in the response body is the workflow transition line. You can find the matching transition line based on the current status from_code and target status to_code. The value of the code field of the transition line is the work item transition code. Constraints N/A Range N/A Default Value N/A |
| issue_ids | No | Array of strings | Definition Unique ID array of work items. You can obtain the value from the Querying Work Items or Querying Tree-shaped Work Items API. The value is id in the response body. Constraints N/A Range N/A Default Value N/A |
| process_context | No | Map<String,Object> | Definition Transition context. Constraints N/A Range N/A Default Value N/A |
Response Parameters
Status code: 200
| Parameter | Type | Description |
|---|---|---|
| status | String | Definition Status code. Range N/A |
| message | String | Definition Response message. Range N/A |
| result | Definition: Response body of performing operations on basic information. Value range: N/A |
| Parameter | Type | Description |
|---|---|---|
| success_num | Integer | Definition: Number of successful batch operations. Value range: N/A |
| fail_num | Integer | Definition: Number of failed batch operations. Value range: N/A |
| failed | Array of IssueWithReasonVO objects | Definition: Data that fails to be operated in batches and failure causes. Value range: N/A |
| Parameter | Type | Description |
|---|---|---|
| id | String | Definition Unique ID of a work item. You can obtain the value from the Querying Work Items or Querying Tree-shaped Work Items API. The value is id in the response body. Range N/A |
| category | String | Definition Work item type. Range Multiple values are supported. Use commas (,) to separate them. |
| title | String | Definition Work item title. Range N/A |
| number | String | Definition Unique number of a work item. Range N/A |
| reason | String | Definition Operation failure cause. Range N/A |
Example Requests
Transferring bugs in batches and overwriting the corresponding fields.
PUT https://{endpoint}/v1/ipdprojectservice/projects/e5c9c13a20a7495a8237c8e81471c8c7/work-item/processes/transfer-batch?is_recover=true
{
"issue_ids" : [ "1167829636360347649" ],
"issue_category" : "Bug",
"flow_code" : "Analyse2Fixed",
"process_context" : {
"attach_work_item_attribute_validator" : {
"assignee" : "09d25f5d3f80d2881fd7c008ecf1622b",
"reason_analysis" : "<p><span style=\"font-size: 14px; color: rgb(25, 25, 25);\">Possible Causes</span></p>"
},
"attach_flow_attribute_validator" : { }
}
} Example Responses
Status code: 200
{
"status" : "success",
"message" : null,
"result" : {
"success_num" : 0,
"fail_num" : 1,
"failed" : [ {
"id" : "1096034499808894976",
"category" : "Bug",
"title" : "Work item title",
"number" : "BUG20250211986398",
"reason" : "The current status has been transferred asynchronously and cannot be transferred to the target status."
} ]
}
} Status Codes
| Status Code | Description |
|---|---|
| 200 | Response to a successful request for transitioning work item processes in batches. |
Error Codes
See Error Codes.
What is your overall rating for this page?
Thank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot