文档首页/ 需求管理 CodeArts Req/ API参考/ API/ IPD配置管理/ 查询项目下工作项类型的关联关系配置 - ListIssueRelationConfig
更新时间:2025-12-11 GMT+08:00
分享

查询项目下工作项类型的关联关系配置 - ListIssueRelationConfig

功能介绍

查询项目下工作项类型的关联关系配置

调用方法

请参见如何调用API

URI

GET /v2/ipdprojectservice/projects/{project_id}/issue-relation-config

表1 路径参数

参数

是否必选

参数类型

描述

project_id

String

参数解释

项目的32位uuid,项目唯一标识,通过查询项目列表接口获取,响应消息体中的project_id字段的值就是项目ID。

约束限制

不涉及。

取值范围

不涉及。

默认取值

不涉及。

请求参数

响应参数

状态码:200

表2 响应Body参数

参数

参数类型

描述

status

String

参数解释:

返回状态。

取值范围:

success:响应成功

error:响应失败

message

String

参数解释:

信息

取值范围:

不涉及

result

RelationConfig object

参数解释:

查询结果

表3 RelationConfig

参数

参数类型

描述

relations

Map<String,Array<Relation>>

key为工作项类型,value为该类型的所有关联关系

表4 Relation

参数

参数类型

描述

type

String

关系code

categories

String

关联的工作项code列表

link_field_code

String

工作流场景使用,前置校验中的关联关系校验字段

relation_name

String

关系名称,在工作项详情关联项下左侧显示

description

String

关系描述

actions

Array of RelateAction objects

动作行为

表5 RelateAction

参数

参数类型

描述

action

String

关联行为code

action_display_name

String

关联行为名称

relate_object_list

Array of RelationObject objects

关联的对象列表

表6 RelationObject

参数

参数类型

描述

object_type

String

实体的种类

categories

Array of strings

类型列表

请求示例

响应示例

状态码:200

响应结果

{
  "status" : "success",
  "message" : null,
  "result" : {
    "relations" : {
      "RR" : [ {
        "type" : "children",
        "categories" : [ "IR" ],
        "link_field_code" : "rr2ir",
        "relation_name" : "子需求",
        "description" : "",
        "actions" : [ {
          "action" : "RELATE_TO_ISSUE",
          "action_display_name" : "关联",
          "relate_object_list" : [ {
            "object_type" : "issue",
            "categories" : [ "IR" ]
          } ]
        }, {
          "action" : "BREAK_DOWN",
          "action_display_name" : "分解",
          "relate_object_list" : [ {
            "object_type" : "issue",
            "categories" : [ "IR" ]
          } ]
        } ]
      }, {
        "type" : "upstream",
        "categories" : [ ],
        "link_field_code" : "",
        "relation_name" : "协同上游需求",
        "description" : "",
        "actions" : [ ]
      }, {
        "type" : "downstream",
        "categories" : [ ],
        "link_field_code" : "",
        "relation_name" : "协同下游需求",
        "description" : "",
        "actions" : [ {
          "action" : "COLLABORATE_DOWNSTREAM",
          "action_display_name" : "协同下发",
          "relate_object_list" : [ {
            "object_type" : "downstream",
            "categories" : [ ]
          } ]
        } ]
      }, {
        "type" : "association",
        "categories" : [ "RR", "SF", "IR", "SR", "DR", "AR", "Task", "Bug" ],
        "link_field_code" : "link",
        "relation_name" : "关联工作项",
        "description" : "",
        "actions" : [ {
          "action" : "RELATE_TO_CREATE_ISSUE",
          "action_display_name" : "新建",
          "relate_object_list" : [ {
            "object_type" : "issue",
            "categories" : [ "RR", "SF", "IR", "Task", "Bug" ]
          } ]
        }, {
          "action" : "RELATE_TO_EXISTING",
          "action_display_name" : "关联已有",
          "relate_object_list" : [ {
            "object_type" : "issue",
            "categories" : [ "RR", "SF", "IR", "SR", "DR", "AR", "Task", "Bug" ]
          } ]
        } ]
      }, {
        "type" : "file",
        "categories" : [ ],
        "link_field_code" : "$$associate_documents",
        "relation_name" : "文件",
        "description" : "",
        "actions" : [ {
          "action" : "RELATE_TO_FILE",
          "action_display_name" : "关联",
          "relate_object_list" : [ {
            "object_type" : "file",
            "categories" : [ ]
          } ]
        } ]
      }, {
        "type" : "wiki",
        "categories" : [ ],
        "link_field_code" : "$$wikis",
        "relation_name" : "Wiki",
        "description" : "",
        "actions" : [ {
          "action" : "RELATE_TO_WIKI",
          "action_display_name" : "关联",
          "relate_object_list" : [ {
            "object_type" : "wiki",
            "categories" : [ ]
          } ]
        } ]
      } ]
    }
  }
}

状态码

状态码

描述

200

响应结果

错误码

请参见错误码

相关文档