I am working on a JIRA automation for a team-managed project where a specific dropdown style custom field is in both an epic and its child stories/tasks.
I can trigger the event properly, its grabbing the right child tasks, but I'm getting invalid JSON errors on the Edit issue fields action:
{
"fields": {
"customfield_11354": {{"issue.customfield_11354"}}
}
}
customfield ID number was obtained from issue settings > custom fields > [my custom field] > looking at the URL.
I've also tried:
"customfield_11354": {{"issue.customfield_11354.id"}}
"customfield_11354": {{"issue.customfield_11354.value"}}
"customfield_11354": {{"issue.customfield_11354.name"}}
Thanks
Because I was within a "for loop" for each of the epic's stories and other children, the following is the correct usage:
{
"fields": {
"customfield_11331" : { "id" : "{{issue.parent.customfield_11331.id}}" }
}
}
I set up a log to see what value is coming back for:
{{issue.customfield_11331.id}}
This returns a valid number (XXXXX).
I then update the edit action to:
{
"fields": {
"customfield_11331" : { "id" : "XXXXX" }
}
}
This works. However, when I update the edit action to:
{
"fields": {
"customfield_11331" : { "id" : "{{issue.customfield_11331.id}}" }
}
}
It does not work. It completes with "success" and the correct tasks are shown affected by the rule, but when you go to the Task(s), the custom field is not updated properly.
I've tried removing the quotes from the smart tag and that throws an error:
Specify a valid 'id' or 'name' for Business Case (customfield_11331)).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.