我是JIRA和看板的新手。我期待着,当我创作一部史诗,并将一些故事和任务与它联系起来。当所有与史诗相关的故事和任务完成后,史诗的状态就会自动改变(例如完成)。但情况似乎并非如此。我可以将史诗从待办事项转移到Done列,即使它的链接任务和故事仍然在待办事项中。有没有办法让JIRA防止这种情况发生?
发布于 2016-02-18 12:03:51
我一直在做类似的事情。我的意图是在状态更改到特定状态时,将另一个链接问题的分配设置为特定用户。
我这样做的工作流程的后置函数为:“将字段值设置为常量或Groovy表达式”
在你的情况下,我会做以下几件事:
对不起,如果不清楚,但很难解释。如果你还需要其他的话请告诉我。
PD:如果你只是想在某个特定的时刻完成这个任务,而不是每个史诗都是自动的,只需添加脚本Runner插件,然后在控制台中运行您的脚本。容易多了。
问候
发布于 2016-07-14 07:59:28
也许这会对您有所帮助:我使用了jira,系统语言设置为“俄语”(而且我不擅长groovy),这就是为什么下面的脚本包含语言依赖项(如果使用不同于我的jira系统语言的话,应该编辑代码!(至少改变一下)
发布于 2021-12-03 14:07:42
如果您使用的是Scriptrunner,那么您应该很好地使用scriptrunner代码。请查看scriptrunner的代码:
// Add the next line as a condition to the script listener, so it gets executed only for epic issues, the line must be written uncommented:
// issue.isEpic
// Check if the resolution has been changed
def resolutionChange = changelog.items.find {
(it as Map).field == 'resolution'
} as Map
logger.info("The resolution change of issue '${issue.key}': ${resolutionChange}.")
if (!resolutionChange) {
logger.info("The resolution didn't change.")
return
}
// Compute the 'Epic Status' value to set based on the resolution value
def newEpicStatusValue = (resolutionChange.toString == 'Done') ? 'Done' : 'To Do'
// Get the 'Epic Status' field ID
final epicStatusField = get("/rest/api/2/field")
.asObject(List)
.body
.find {
(it as Map).name == 'Epic Status'
} as Map
def epicStatusFieldId = epicStatusField.id
logger.info("Updating Epic Status field (${epicStatusFieldId}) to '${newEpicStatusValue}'.")
// Update the 'Epic Status' field value
put("/rest/api/2/issue/${issue.key}")
.queryString("overrideScreenSecurity", Boolean.TRUE)
.header("Content-Type", "application/json")
.body([
fields: [
(epicStatusFieldId): [value: newEpicStatusValue]
]
])
.asString()您可以在jira中自动化这段代码,您的后功能或自动化。请在这个链接中找到更多的细节。
https://stackoverflow.com/questions/35468017
复制相似问题