Jira获取issue活动中改动记录,查找xx更新过xx field字段

博客介绍了使用Jira api/2/issue接口获取issue活动中改动记录的方法。给出了接口请求示例,说明了fields参数可指定返回的字段,expand参数可包含默认隐藏的响应部分,还介绍了properties参数的使用及接口对issue的识别方式等。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

#Jira获取issue活动中改动记录,查找xx更新过xx field字段
可以使用jira api/2/issue 接口:
Get issue GET /rest/api/2/issue/{issueIdOrKey}
jira_server_url + ‘/rest/api/2/issue/%s?expand=changelog&fields=summary’ % jira_key
fields 指定主题是因为不指定会返回所有fields字段信息!
返回值结构:
{
“changelog”:{
“total”:16,
“startAt”:0,
“histories”:Array[16],
“maxResults”:16
},
“fields”:Object{…},
“self”:“http://jira.xxxxx.com/rest/api/2/issue/xxxxxx”,
“key”:“xxxxxx”,
“id”:“xxxxx”,
“expand”:“renderedFields,names,schema,operations,editmeta,changelog,versionedRepresentations”
}

jira api/2/issue 接口:
Get issue GET /rest/api/2/issue/{issueIdOrKey}

Returns a full representation of the issue for the given issue key.

An issue JSON consists of the issue key, a collection of fields, a link to the workflow transition sub-resource, and (optionally) the HTML rendered values of any fields that support it (e.g. if wiki syntax is enabled for the description or comments).

The fields param (which can be specified multiple times) gives a comma-separated list of fields to include in the response. This can be used to retrieve a subset of fields. A particular field can be excluded by prefixing it with a minus.

By default, all (*all) fields are returned in this get-issue resource. Note: the default is different when doing a jql search – the default there is just navigable fields (*navigable).

*all - include all fields
*navigable - include just navigable fields
summary,comment - include just the summary and comments
-comment - include everything except comments (the default is *all for get-issue)
*all,-comment - include everything except comments
The {@code properties} param is similar to {@code fields} and specifies a comma-separated list of issue properties to include. Unlike {@code fields}, properties are not included by default. To include them all send {@code ?properties=*all}. You can also include only specified properties or exclude some properties with a minus (-) sign.

{@code *all} - include all properties
{@code *all, -prop1} - include all properties except {@code prop1}
{@code prop1, prop1} - include {@code prop1} and {@code prop2} properties
JIRA will attempt to identify the issue by the issueIdOrKey path parameter. This can be an issue id, or an issue key. If the issue cannot be found via an exact match, JIRA will also look for the issue in a case-insensitive way, or by looking to see if the issue was moved. In either of these cases, the request will proceed as normal (a 302 or other redirect will not be returned). The issue key contained in the response will indicate the current value of issue’s key.

The expand param is used to include, hidden by default, parts of response. This can be used to include:

renderedFields - field values in HTML format
names - display name of each field
schema - schema for each field which describes a type of the field
transitions - all possible transitions for the given issue
operations - all possibles operations which may be applied on issue
editmeta - information about how each field may be edited. It contains field’s schema as well.
changelog - history of all changes of the given issue
versionedRepresentations - REST representations of all fields. Some field may contain more recent versions. RESET representations are numbered. The greatest number always represents the most recent version. It is recommended that the most recent version is used. version for these fields which provide a more recent REST representation. After including versionedRepresentations “fields” field become hidden.
Request
QUERY PARAMETERS
parameter type description
fields string the list of fields to return for the issue. By default, all fields are returned.

expand string
properties string the list of properties to return for the issue. By default no properties are returned.

<think>我们正在处理一个关于JiraSoftware的问题:用户希望从问题页面中移除子事项字段。根据Jira的配置,问题页面上的字段是通过“界面方案”控制的。要移除一个字段,我们需要编辑该问题类型对应的界面方案,从界面中移除该字段。步骤:1.以管理员身份登录Jira。2.进入“设置”>“问题”>“界面方案”。3.找到与当前项目以及问题类型相关联的界面方案。4.编辑该界面方案,找到需要修改的界面(通常是“默认界面”或自定义界面)。5.在界面编辑器中,找到“子任务”(或类似名称)的字段,将其从界面中移除(通常是移到“隐藏字段”区域)。6.保存更改。注意:移除子事项字段可能会影响用户创建或查看子任务的能力,请确保这是用户想要的效果。引用说明:在引用[2]中提到了项目设置中的“界面”配置,我们可以通过界面方案来配置问题页面显示的字段。因此,我们可以参考这个引用。因此,回答如下:</think>### 如何在Jira Software中移除问题页面的子事项字段 要移除Jira问题页面的子事项字段,需通过**界面方案**配置实现。以下是具体步骤: 1. **进入Jira管理后台** 以管理员身份登录Jira → 点击右上角**设置**(⚙️图标)→ 选择**问题** → 点击**界面方案**。 2. **定位目标界面方案** 在界面方案列表中,找到当前项目使用的方案(可通过项目设置查看关联方案)。点击方案名称进入编辑模式[^2]。 3. **编辑问题界面** 在"界面"区域找到目标问题类型对应的界面(如"默认界面"),点击**配置**按钮进入字段管理页。 4. **移除子事项字段** - 在字段列表中搜索`子任务`或`Subtask`字段 - 将该字段从**已显示字段**区域拖拽至**隐藏字段**区域 - 点击**完成**保存配置[^2]。 5. **验证更改** 返回项目的问题创建/查看页面,确认子事项字段已消失(可能需要刷新页面)。 > ⚠️ 注意事项: > - 此操作仅影响界面显示,不会删除已有子任务数据 > - 若需彻底禁用子任务功能,需在**项目设置**→**功能**中关闭子任务选项 > - 修改全局界面方案会影响所有关联项目,建议先复制方案进行测试[^2] ```mermaid graph LR A[管理员登录] --> B[设置>问题>界面方案] B --> C{定位项目关联方案} C --> D[编辑目标界面] D --> E[拖拽子任务字段至隐藏区] E --> F[保存配置] F --> G[验证问题页面] ```
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值