我正在建立JIRA。我做了以下步骤。
Reopen Issue Event
)然后A想要在Reopen Issue Event
发生时增加归档
那么如何在groovy中编写Add-On
脚本?
答案 0 :(得分:0)
我知道你要求groovy,但你可以用python解决它。 安装Scripting Suite add-on并将Jython后期功能添加到您的工作流程中,使用以下代码将重新打开转换为列表中的第一个:
from com.atlassian.jira.component import ComponentAccessor
customFieldManager = ComponentAccessor.getCustomFieldManager()
myNumberField = customFieldManager.getCustomFieldObject(10000) # id of your custom field
val = issue.getCustomFieldValue(myNumberField)
newval = 1.0 if not val else val + 1
issue.setCustomFieldValue(myNumberField, newval)
剧透:我是这个附加组件的作者