我可以根据 Jenkins 构建更改 JIRA 问题状态吗
Can I change JIRA issue status based on a Jenkins build
我可以根据 Jenkins 构建更改 JIRA 问题状态吗?通过詹金斯文件。请推荐
可以使用Jira steps插件,也可以使用Jira API。
例如使用 Jira 步骤:
withEnv(['JIRA_SITE=your_site']) {
def issue_key = 'MY-12345'
def result = jiraGetIssue idOrKey: issue_key, failOnError:false
// you can now expore the issue
// when you want to change the status, it's called "transition"
def transition_to_closed_jira_id = 88 // you need to find out your ID
def transitionInput = [ transition: [ id: transition_to_closed_jira_id ] ]
jiraTransitionIssue idOrKey: issue_key, input: transitionInput
我可以根据 Jenkins 构建更改 JIRA 问题状态吗?通过詹金斯文件。请推荐
可以使用Jira steps插件,也可以使用Jira API。
例如使用 Jira 步骤:
withEnv(['JIRA_SITE=your_site']) {
def issue_key = 'MY-12345'
def result = jiraGetIssue idOrKey: issue_key, failOnError:false
// you can now expore the issue
// when you want to change the status, it's called "transition"
def transition_to_closed_jira_id = 88 // you need to find out your ID
def transitionInput = [ transition: [ id: transition_to_closed_jira_id ] ]
jiraTransitionIssue idOrKey: issue_key, input: transitionInput