Hello guys,
we are facing a problem in our plugin.
we have recently devolved a plugin but unfortunately it doesn't work well.
what the plugin does that it creates a postfunction, which creates one or more subtasks using json format and it works but sometimes we want to get the value of a customField and but it in the summary of the subtask but it doesn't shows the value rather it shows
like this :
Subtask 1: $cf.customField:('customfield_10200')
JSON format that it used to create Subtasks
[
{
"id": 1,
"summary": "Subtask 1: $cf.customField('customfield_10200')",
"description": "Description 1",
"assignee": "admin",
"links": []
}
]
what about
function getCustomField() {
var key = this.JIRA.Issue.getIssueKey();
var yourCustomField;
AJS.$.ajax({
url: "/rest/api/2/issue/" + key,
type: 'get',
dataType: 'json',
async: false,
success: function(data) {
yourCustomField = data.fields.customfield_12345;
}
});
return yourCustomField;
};
getCustomField();
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.