使用脚本[行为插件]访问JIRA系统字段值

问题描述 投票:0回答:1

我已经尝试使用带有以下脚本的行为插件。我需要的是读取问题的Sprint字段值。

FormField sprint = getFieldByName("Sprint")
FormField productArea = getFieldByName("Product Area")
String sprintValue = (String) sprint.getValue()
if(sprintValue!= null){
productArea.setReadOnly(true)
}

这是我在插件中配置的..

但很难找到任何解决方案。我需要检查这个sprint字段值是否为null然后设置一个字段只读..我在这里遗漏了什么? JIRA版(6.4)

javascript jira jira-plugin
1个回答
0
投票

尝试打印sprint值并查看它是否为null或该字段是表单的一部分等。根据这一点,您应该能够改变您的条件以使其工作。

© www.soinside.com 2019 - 2024. All rights reserved.