配置域(Fields)
一般问题的ields中的属性分为固定属性和自定义属性,自定义属性格式一般为类似customfield_10012这种。常用的问题的Fields有:
assignee:经办人
created: 创建时间
creator: 创建人
labels: 标签
priorit: 优先级
progress:
project: 所示项目
reporter: 报告人
status: 状态
summary: 问题描述
worklog: 活动日志
updated: 更新时间
watches: 关注者
comments: 评论
resolution: 解决方案
subtasks: 子任务
issuelinks: 连接问题
lastViewed: 最近查看时间
attachment
示例如下:
issue = jira.issue('JRA-1330')
print(issue.key, issue.fields.summary, issue.fields.status)
关注者/评论/附件
jira.watchers(): 问题的关注者
jira.add_watcher(): 添加关注者
jira.remove_watcher(): 移除关注者
jira.comments(): 问题的所有评论
jira.comment(): 某条评论
jira.add_comment():添加评论
comment.update()/delete(): 更新/删除评论
jira.add_attachment(): 添加附件
示例如下:
issue = jira.issue('JRA-1330')
print(jiaa.watchers(issue)) # 所有关注者
jira.add_watcher(issue, 'username') # 添加关注者
print(jira.comments(issue)) # 所有评论
comment = jira.comment(issue, '10234') # 某条评论
jira.add_comment(issue, 'new comment') # 新增评论
comment.update(body='update comment') # 更新评论
comment.delete() # 删除该评论
print(issue
龙腾原创
联系作者:xiaowanzi02620