基于Jira中的自定义字段选择设置默认描述
我对使用Velocity是新手,但这正是我试图做的 根据问题类型服务请求和自定义字段选项“a”,将说明设置为显示“x” 根据问题类型服务请求和自定义字段选项“b”,将说明设置为显示“y” 基于问题类型服务请求和自定义字段选项“c”,将描述设置为显示“z” 为此,我使用了以下方法基于Jira中的自定义字段选择设置默认描述,jira,Jira,我对使用Velocity是新手,但这正是我试图做的 根据问题类型服务请求和自定义字段选项“a”,将说明设置为显示“x” 根据问题类型服务请求和自定义字段选项“b”,将说明设置为显示“y” 基于问题类型服务请求和自定义字段选项“c”,将描述设置为显示“z” 为此,我使用了以下方法 if (($issue.key == '') & ($issue.type().getname == 'service request') & ($customfieldmanager().getcust
if (($issue.key == '') & ($issue.type().getname == 'service request') & ($customfieldmanager().getcustomfieldoption = '11504') & ($id == 'a'))
set ($description = 'x')
elseif ($id == 'b')
set ($description = 'y')
else ($id == 'c')
set ($description = 'z')
似乎无法识别自定义字段id或自定义字段选择id
任何人都可以推荐这里可能出现的问题,我没有运气,尝试了一些不同的方法,花了几天时间试图解决这个问题
如需帮助,将不胜感激。有关逻辑和,请使用&&代替&。请看这里: 如果,否则,设置应该在前面 如果需要结束: 在您的示例中,issue和customfieldmanager应该在velocity范围内。因此JIRA或您的JIRA插件操作应该具有适当的getIssue和getCustomFieldManager方法,您可以在velocity中以$issue和$customFieldManager或$getIssue和$getCustomFieldManager的形式访问它们。注意箱子和支架。getname和getcustomfieldoption的情况类似。请看这里: 我不确定方法名称中的小写/大写字母,但更正后的版本可能如下所示:
#if ($issue.key == '' && $issue.getType().getName() == 'service request' && $customFieldManager.getCustomFieldOption() == '11504' && $id == 'a')
#set ($description = 'x')
#elseif ($id == 'b')
#set ($description = 'y')
#else ($id == 'c')
#set ($description = 'z')
#end
你好,谢谢,但这也不起作用。如何使用MySQL在数据库中调用customfieldoption ID:从customfieldoption中选择ID,其中customfield='11504';从该customfield调用3个选项。我将如何在velocity模板中使用它,以便根据customfieldi iD选择更改描述不确定这是否已经完成,但是否有其他方法可以获得我想要的?