Querying the Work Item List
Function
This API is used to obtain the list of raw requirements, system features, R&D requirements, or bugs of an IPD project. You can filter work items based on different criteria.
Calling Method
For details, see Calling APIs.
URI
POST /v1/ipdprojectservice/projects/{project_id}/issues/query
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Definition: 32-character UUID of a project, which uniquely identifies a project. Obtain the value of this parameter from the project_id field in the response body of the Querying the Project List API. Constraints: N/A Range: N/A Default value: N/A |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
issue_type |
Yes |
String |
Definition: Work item type, which is case sensitive. If an incorrect work item type is transferred, no data is returned. For system device and standalone software projects, if issue_type is set to a work item type without parent-child relationship, only the data of the first work item type is returned. Constraints: Multiple values are supported. Use commas (,) to separate them. Options: For system device projects, options include RR, SF, IR, SR, AR, Task, and Bug. For standalone software projects, options include RR, SF, IR, US, Task, and Bug. For cloud service projects, options include RR, Epic, FE, US, Task, and Bug. Default value: N/A |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
filter |
No |
Array of Map<String,ConditionVO> objects |
Definition: Query filter. Constraints: Maximum length: 200 characters. |
filter_mode |
No |
String |
Definition: Filter mode. Constraints: Maximum length: 512 characters. Options: N/A Default value: N/A |
page |
No |
PageInfoVO object |
Definition: Pagination information. Constraints: N/A |
sort |
No |
Array of SortInfo objects |
Definition: Sorting criteria. Constraints: N/A |
return_fields |
No |
Array of strings |
Definition: Returned field. Constraints: N/A |
model_ids |
No |
Array of strings |
Definition: Model ID. Value range: 10001: system device 10002: standalone software 10003: self-operated software/cloud service Constraints: N/A |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
values |
No |
Array of strings |
Definition: Condition array. Constraints: Maximum length: 200 characters. |
operator |
No |
String |
Definition: Operator. Constraints: N/A Options: N/A Default value: N/A |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
page_no |
No |
Integer |
Definition: Page index. Constraints: N/A Options: Minimum value: 1. Maximum value: 10,000. Default value: N/A |
page_size |
No |
Integer |
Definition: Number of records displayed on each page Constraints: N/A Options: Minimum value: 5. Maximum value: 200. Default value: N/A |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
status |
String |
Definition: Status. Options: N/A |
message |
String |
Definition: Information. Options: N/A |
result |
Map<String,Object> |
Definition: Result data. |
Status code: 400
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error message. |
Example Requests
Post https://{endpoint}/v1/ipdprojectservice/projects/{project_id}/issues/query?issue_type=IR,US { "filter" : [ { "descendants.plan_pi" : { "values" : [ "956200745322848257" ], "operator" : "||" }, "descendants.plan_iteration" : { "values" : [ "956200745322848257-child" ], "operator" : "||" } }, { "descendants.priority" : { "values" : [ "Medium" ], "operator" : "||" } }, { "descendants.assignee" : { "values" : [ "a360371833bf4c558f796fd707b44daf" ], "operator" : "||" } }, { "descendants.status" : { "values" : [ "Start" ], "operator" : "||" } }, { "parent_id" : { "values" : [ "" ], "operator" : "||" } } ], "page" : { "page_no" : 1, "page_size" : 20 } }
Example Responses
Status code: 200
Response to a successful request for querying the work item list.
{ "status" : "success", "message" : null, "result" : { "total" : 1, "issues" : [ { "promised" : null, "type" : "raw requirement", "src_domain" : { "id" : "965714701520515072", "name" : "IPD-System Device-0217", "title" : "IPD-System Device-0217", "project_id" : "e4b0424709934bd1a54753e70336564d", "parent_id" : null, "category" : "Project", "created_by" : "a360371833bf4c558f796fd707b44daf", "model_id" : "10001" }, "domain_id" : { "id" : "965714701520515072", "name" : "IPD-System Device-0217", "title" : "IPD-System Device-0217", "project_id" : "e4b0424709934bd1a54753e70336564d", "parent_id" : null, "category" : "Project", "created_by" : "a360371833bf4c558f796fd707b44daf", "model_id" : "10001" }, "send_from" : "", "number" : "RR20240402742063", "send_to" : "", "convolution_actual_hours" : null, "workload_man_day" : null, "id" : "981935538274476033", "state" : "Working", "stay_days" : 1, "assigned_cc" : null, "submit_time" : "1712041275000", "workitem2label" : null, "close_time" : null, "priority" : { "id" : "965714705672876036", "display_value" : "Medium", "value" : "Medium", "code" : "Medium", "value_py" : "2", "sequence" : 2, "level" : 1, "domain_id" : "965714701520515072", "belong_definition_type" : "5" }, "modified_date" : "1712041276000", "created_by" : { "watcher" : null, "user_id" : "a360371833bf4c558f796fd707b44daf", "user_num_id" : 4091, "user_name" : "devcloud_devcloud_s00404480_01", "domain_id" : "4e919d73499648e3b0292cd3cbef806a", "domain_name" : "devcloud_devcloud_s00404480_01", "nick_name" : "Test account", "role_id" : "8dc2cd191a104148a77f937681f9a5d6,6af50476ba89492698d237fb6fa456d6", "role_name" : "Project administrator, Project manager", "role_code" : "project_admin,Project manager", "image_id" : null, "region" : null, "has_removed" : null }, "break_status" : { "id" : "965714705672876041", "display_value" : "Not broken down", "value" : "undecomposed", "code" : "undecomposed", "value_py" : "undecomposed", "sequence" : 2, "level" : 1, "domain_id" : "965714701520515072", "belong_definition_type" : "5" }, "status_modified_date" : "1712041276000", "canceled" : null, "expect_delivery_time" : null, "parent_id" : null, "assignee" : { "watcher" : null, "user_id" : "a360371833bf4c558f796fd707b44daf", "user_num_id" : 4091, "user_name" : "devcloud_devcloud_s00404480_01", "domain_id" : "4e919d73499648e3b0292cd3cbef806a", "domain_name" : "devcloud_devcloud_s00404480_01", "nick_name" : "Test account", "role_id" : "8dc2cd191a104148a77f937681f9a5d6,6af50476ba89492698d237fb6fa456d6", "role_name" : "Project administrator, Project manager", "role_code" : "project_admin,Project manager", "image_id" : null, "region" : null, "has_removed" : null }, "region" : "region01", "status" : { "id" : "965714705815482388", "belonging" : "START", "space_id" : "965714701520515072", "name" : "Analyzing", "status_category" : null, "code" : "Analyse", "definition_type" : "5", "belong_definition_type" : 3, "belong_scope" : null, "display_value" : "Analyzing", "position" : 2, "displayable" : 1, "editable" : 1, "deletable" : 1, "mutable" : 1, "title_py" : "fx", "builtin" : null, "label" : null, "description" : null, "created_by" : "a360371833bf4c558f796fd707b44daf", "created_userinfo" : null, "created_on" : null, "created_date" : 1708202727000, "modified_date" : 1708202727000, "modified_by" : "a360371833bf4c558f796fd707b44daf", "category_code" : null, "editing_fields" : null, "associate" : null, "linkage_node_fields" : false }, "tenant_id" : "4e919d73499648e3b0292cd3cbef806a", "link" : "", "is_suspended" : null, "change_status" : null, "title" : "RR-01", "sum_workload_man_day" : null, "plan_end_date" : null, "rr2ir" : "", "convolution_plan_hours" : null, "submitted_by" : [ { "watcher" : null, "user_id" : "a360371833bf4c558f796fd707b44daf", "user_num_id" : 4091, "user_name" : "devcloud_devcloud_s00404480_01", "domain_id" : "4e919d73499648e3b0292cd3cbef806a", "domain_name" : "devcloud_devcloud_s00404480_01", "nick_name" : "Test account", "role_id" : "8dc2cd191a104148a77f937681f9a5d6,6af50476ba89492698d237fb6fa456d6", "role_name" : "Project administrator, Project manager", "role_code" : "project_admin,Project manager", "image_id" : null, "region" : null, "has_removed" : null } ], "rr2us" : "", "cascade_delete" : "none", "recipient" : [ { "watcher" : null, "user_id" : "a360371833bf4c558f796fd707b44daf", "user_num_id" : 4091, "user_name" : "devcloud_devcloud_s00404480_01", "domain_id" : "4e919d73499648e3b0292cd3cbef806a", "domain_name" : "devcloud_devcloud_s00404480_01", "nick_name" : "Test account", "role_id" : "8dc2cd191a104148a77f937681f9a5d6,6af50476ba89492698d237fb6fa456d6", "role_name" : "Project administrator, Project manager", "role_code" : "project_admin,Project manager", "image_id" : null, "region" : null, "has_removed" : null } ], "modified_by" : { "watcher" : null, "user_id" : "a360371833bf4c558f796fd707b44daf", "user_num_id" : 4091, "user_name" : "devcloud_devcloud_s00404480_01", "domain_id" : "4e919d73499648e3b0292cd3cbef806a", "domain_name" : "devcloud_devcloud_s00404480_01", "nick_name" : "Test account", "role_id" : "8dc2cd191a104148a77f937681f9a5d6,6af50476ba89492698d237fb6fa456d6", "role_name" : "Project administrator, Project manager", "role_code" : "project_admin,Project manager", "image_id" : null, "region" : null, "has_removed" : null }, "created_date" : "1712041275000", "closed_flag" : null, "category" : "RR", "collaborative_status" : [ ], "setup" : true, "parent_status" : "no" } ] } }
SDK Sample Code
The SDK sample code is as follows.
Java
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 |
package com.huaweicloud.sdk.test; import com.huaweicloud.sdk.core.auth.ICredential; import com.huaweicloud.sdk.core.auth.BasicCredentials; import com.huaweicloud.sdk.core.exception.ConnectionException; import com.huaweicloud.sdk.core.exception.RequestTimeoutException; import com.huaweicloud.sdk.core.exception.ServiceResponseException; import com.huaweicloud.sdk.projectman.v4.region.ProjectManRegion; import com.huaweicloud.sdk.projectman.v4.*; import com.huaweicloud.sdk.projectman.v4.model.*; import java.util.List; import java.util.ArrayList; import java.util.Map; import java.util.HashMap; public class ListIpdProjectIssuesSolution { public static void main(String[] args) { // The AK and SK used for authentication are hard-coded or stored in plaintext, which has great security risks. It is recommended that the AK and SK be stored in ciphertext in configuration files or environment variables and decrypted during use to ensure security. // In this example, AK and SK are stored in environment variables for authentication. Before running this example, set environment variables CLOUD_SDK_AK and CLOUD_SDK_SK in the local environment String ak = System.getenv("CLOUD_SDK_AK"); String sk = System.getenv("CLOUD_SDK_SK"); ICredential auth = new BasicCredentials() .withAk(ak) .withSk(sk); ProjectManClient client = ProjectManClient.newBuilder() .withCredential(auth) .withRegion(ProjectManRegion.valueOf("<YOUR REGION>")) .build(); ListIpdProjectIssuesRequest request = new ListIpdProjectIssuesRequest(); request.withProjectId("{project_id}"); SearchIpdIssuesRequestBody body = new SearchIpdIssuesRequestBody(); PageInfoVO pagebody = new PageInfoVO(); pagebody.withPageNo(1) .withPageSize(20); List<String> listFilterValues = new ArrayList<>(); listFilterValues.add(""); ConditionVO filterFilter = new ConditionVO(); filterFilter.withOperator("||") .withValues(listFilterValues); Map<String, ConditionVO> listFilterFilter1 = new HashMap<>(); listFilterFilter1.put("parent_id", filterFilter); List<String> listFilterValues1 = new ArrayList<>(); listFilterValues1.add("Start"); ConditionVO filterFilter2 = new ConditionVO(); filterFilter2.withOperator("||") .withValues(listFilterValues1); Map<String, ConditionVO> listFilterFilter3 = new HashMap<>(); listFilterFilter3.put("descendants.status", filterFilter2); List<String> listFilterValues2 = new ArrayList<>(); listFilterValues2.add("a360371833bf4c558f796fd707b44daf"); ConditionVO filterFilter4 = new ConditionVO(); filterFilter4.withOperator("||") .withValues(listFilterValues2); Map<String, ConditionVO> listFilterFilter5 = new HashMap<>(); listFilterFilter5.put("descendants.assignee", filterFilter4); List<String> listFilterValues3 = new ArrayList<>(); listFilterValues3.add("Medium"); ConditionVO filterFilter6 = new ConditionVO(); filterFilter6.withOperator("||") .withValues(listFilterValues3); Map<String, ConditionVO> listFilterFilter7 = new HashMap<>(); listFilterFilter7.put("descendants.priority", filterFilter6); List<String> listFilterValues4 = new ArrayList<>(); listFilterValues4.add("956200745322848257-child"); ConditionVO filterFilter8 = new ConditionVO(); filterFilter8.withOperator("||") .withValues(listFilterValues4); List<String> listFilterValues5 = new ArrayList<>(); listFilterValues5.add("956200745322848257"); ConditionVO filterFilter9 = new ConditionVO(); filterFilter9.withOperator("||") .withValues(listFilterValues5); Map<String, ConditionVO> listFilterFilter10 = new HashMap<>(); listFilterFilter10.put("descendants.plan_pi", filterFilter9); listFilterFilter10.put("descendants.plan_iteration", filterFilter8); List<Map<String, ConditionVO>> listbodyFilter = new ArrayList<>(); listbodyFilter.add(listFilterFilter1); listbodyFilter.add(listFilterFilter3); listbodyFilter.add(listFilterFilter5); listbodyFilter.add(listFilterFilter7); listbodyFilter.add(listFilterFilter10); body.withPage(pagebody); body.withFilter(listbodyFilter); request.withBody(body); try { ListIpdProjectIssuesResponse response = client.listIpdProjectIssues(request); System.out.println(response.toString()); } catch (ConnectionException e) { e.printStackTrace(); } catch (RequestTimeoutException e) { e.printStackTrace(); } catch (ServiceResponseException e) { e.printStackTrace(); System.out.println(e.getHttpStatusCode()); System.out.println(e.getRequestId()); System.out.println(e.getErrorCode()); System.out.println(e.getErrorMsg()); } } } |
Python
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 |
# coding: utf-8 import os from huaweicloudsdkcore.auth.credentials import BasicCredentials from huaweicloudsdkprojectman.v4.region.projectman_region import ProjectManRegion from huaweicloudsdkcore.exceptions import exceptions from huaweicloudsdkprojectman.v4 import * if __name__ == "__main__": # The AK and SK used for authentication are hard-coded or stored in plaintext, which has great security risks. It is recommended that the AK and SK be stored in ciphertext in configuration files or environment variables and decrypted during use to ensure security. # In this example, AK and SK are stored in environment variables for authentication. Before running this example, set environment variables CLOUD_SDK_AK and CLOUD_SDK_SK in the local environment ak = os.environ["CLOUD_SDK_AK"] sk = os.environ["CLOUD_SDK_SK"] credentials = BasicCredentials(ak, sk) client = ProjectManClient.new_builder() \ .with_credentials(credentials) \ .with_region(ProjectManRegion.value_of("<YOUR REGION>")) \ .build() try: request = ListIpdProjectIssuesRequest() request.project_id = "{project_id}" pagebody = PageInfoVO( page_no=1, page_size=20 ) listValuesFilter = [ "" ] filterFilter = ConditionVO( operator="||", values=listValuesFilter ) listFilterFilter1 = { "parent_id": filterFilter } listValuesFilter1 = [ "Start" ] filterFilter2 = ConditionVO( operator="||", values=listValuesFilter1 ) listFilterFilter3 = { "descendants.status": filterFilter2 } listValuesFilter2 = [ "a360371833bf4c558f796fd707b44daf" ] filterFilter4 = ConditionVO( operator="||", values=listValuesFilter2 ) listFilterFilter5 = { "descendants.assignee": filterFilter4 } listValuesFilter3 = [ "Medium" ] filterFilter6 = ConditionVO( operator="||", values=listValuesFilter3 ) listFilterFilter7 = { "descendants.priority": filterFilter6 } listValuesFilter4 = [ "956200745322848257-child" ] filterFilter8 = ConditionVO( operator="||", values=listValuesFilter4 ) listValuesFilter5 = [ "956200745322848257" ] filterFilter9 = ConditionVO( operator="||", values=listValuesFilter5 ) listFilterFilter10 = { "descendants.plan_pi": filterFilter9, "descendants.plan_iteration": filterFilter8 } listFilterbody = [ listFilterFilter1, listFilterFilter3, listFilterFilter5, listFilterFilter7, listFilterFilter10 ] request.body = SearchIpdIssuesRequestBody( page=pagebody, filter=listFilterbody ) response = client.list_ipd_project_issues(request) print(response) except exceptions.ClientRequestException as e: print(e.status_code) print(e.request_id) print(e.error_code) print(e.error_msg) |
Go
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 |
package main import ( "fmt" "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/auth/basic" projectman "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/projectman/v4" "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/projectman/v4/model" region "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/projectman/v4/region" ) func main() { // The AK and SK used for authentication are hard-coded or stored in plaintext, which has great security risks. It is recommended that the AK and SK be stored in ciphertext in configuration files or environment variables and decrypted during use to ensure security. // In this example, AK and SK are stored in environment variables for authentication. Before running this example, set environment variables CLOUD_SDK_AK and CLOUD_SDK_SK in the local environment ak := os.Getenv("CLOUD_SDK_AK") sk := os.Getenv("CLOUD_SDK_SK") auth := basic.NewCredentialsBuilder(). WithAk(ak). WithSk(sk). Build() client := projectman.NewProjectManClient( projectman.ProjectManClientBuilder(). WithRegion(region.ValueOf("<YOUR REGION>")). WithCredential(auth). Build()) request := &model.ListIpdProjectIssuesRequest{} request.ProjectId = "{project_id}" pageNoPage:= int32(1) pageSizePage:= int32(20) pagebody := &model.PageInfoVo{ PageNo: &pageNoPage, PageSize: &pageSizePage, } var listValuesFilter = []string{ "", } operatorFilter:= "||" filterFilter := model.ConditionVo{ Operator: &operatorFilter, Values: &listValuesFilter, } var listFilterFilter1 = map[string](model.ConditionVo){ "parent_id": filterFilter, } var listValuesFilter1 = []string{ "Start", } operatorFilter1:= "||" filterFilter3 := model.ConditionVo{ Operator: &operatorFilter1, Values: &listValuesFilter1, } var listFilterFilter4 = map[string](model.ConditionVo){ "descendants.status": filterFilter3, } var listValuesFilter2 = []string{ "a360371833bf4c558f796fd707b44daf", } operatorFilter2:= "||" filterFilter6 := model.ConditionVo{ Operator: &operatorFilter2, Values: &listValuesFilter2, } var listFilterFilter7 = map[string](model.ConditionVo){ "descendants.assignee": filterFilter6, } var listValuesFilter3 = []string{ "Medium", } operatorFilter3:= "||" filterFilter9 := model.ConditionVo{ Operator: &operatorFilter3, Values: &listValuesFilter3, } var listFilterFilter10 = map[string](model.ConditionVo){ "descendants.priority": filterFilter9, } var listValuesFilter4 = []string{ "956200745322848257-child", } operatorFilter4:= "||" filterFilter12 := model.ConditionVo{ Operator: &operatorFilter4, Values: &listValuesFilter4, } var listValuesFilter5 = []string{ "956200745322848257", } operatorFilter5:= "||" filterFilter13 := model.ConditionVo{ Operator: &operatorFilter5, Values: &listValuesFilter5, } var listFilterFilter14 = map[string](model.ConditionVo){ "descendants.plan_pi": filterFilter13, "descendants.plan_iteration": filterFilter12, } var listFilterbody = []map[string](model.ConditionVo){ listFilterFilter1, listFilterFilter4, listFilterFilter7, listFilterFilter10, listFilterFilter14, } request.Body = &model.SearchIpdIssuesRequestBody{ Page: pagebody, Filter: &listFilterbody, } response, err := client.ListIpdProjectIssues(request) if err == nil { fmt.Printf("%+v\n", response) } else { fmt.Println(err) } } |
More
For SDK sample code of more programming languages, see the Sample Code tab in API Explorer. SDK sample code can be automatically generated.
Status Codes
Status Code |
Description |
---|---|
200 |
Response to a successful request for querying the work item list. |
400 |
Error message. |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank 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