Jira 获取自定义字段选项
有人知道如何使用velocity模板获取自定义字段选项吗 我正在尝试根据问题类型和自定义字段选项设置默认描述,任何人都可以提供帮助Jira 获取自定义字段选项,jira,velocity,Jira,Velocity,有人知道如何使用velocity模板获取自定义字段选项吗 我正在尝试根据问题类型和自定义字段选项设置默认描述,任何人都可以提供帮助 我尝试过使用Java脚本,但没有成功使用Jira REST API您可以使用该方法http://example.com:8080/jira/rest/api/2/issue/createmeta?expand=projects.issuetypes.fields()。这将为您提供有关可用问题类型、自定义字段及其特定选项的详细信息。` `<script lang
我尝试过使用Java脚本,但没有成功使用Jira REST API您可以使用该方法
http://example.com:8080/jira/rest/api/2/issue/createmeta?expand=projects.issuetypes.fields
()。这将为您提供有关可用问题类型、自定义字段及其特定选项的详细信息。`
`<script language="javascript" type="text/javascript">
issueType = document.getElementById("issuetype-field");
requestType = document.getElementById("customfield_11504");
description = document.getElementById("description");
if (issueType)
{
target = document.getElementById == "2";
// Hide the Target Field if issueType isn't Service Request
if (requestType)
{
target = document.getElementById("customfield_11504");
// Hide Target Field if requestType isn't Deployment
if (issueType.value != "2") target.style.display = 'none';
issueType.onchange = function()
{
if (this.value == "2")
{
requestType.onchange = function()
{
if (this.value == "11501")
{
description.style.display = '';
description.value = 'Default Text for Deployment';
requestType.onchange = function()
{
if (this.value == "11900")
{
description.style.display = '';
description.value = 'Default Text for Enhancement';
requestType.onchange = function()
{
if (this.value == "11901")
{
description.style.display = '';
description.value = 'Default Text for New Account';
}
}
;
}
}
;
}
}
;
}
}
;
}`
issueType=document.getElementById(“issueType字段”);
requestType=document.getElementById(“customfield_11504”);
description=document.getElementById(“description”);
如果(issueType)
{
target=document.getElementById==“2”;
//如果issueType不是服务请求,则隐藏目标字段
如果(请求类型)
{
target=document.getElementById(“customfield_11504”);
//如果requestType不是部署,则隐藏目标字段
如果(issueType.value!=“2”)target.style.display='none';
issueType.onchange=函数()
{
如果(this.value==“2”)
{
requestType.onchange=函数()
{
如果(this.value==“11501”)
{
description.style.display='';
description.value='部署的默认文本';
requestType.onchange=函数()
{
如果(this.value==“11900”)
{
description.style.display='';
description.value='增强的默认文本';
requestType.onchange=函数()
{
如果(this.value==“11901”)
{
description.style.display='';
description.value='新帐户的默认文本';
}
}
;
}
}
;
}
}
;
}
}
;
}`
我们希望看到您的代码尝试。。。