Transferring Checkbox values from linked issue to trigger issue

Erin Blomert
Contributor
November 2, 2022

Hello,

I am struggling a bit with an automation.  Here are the steps:

1. When an issue is transitioned,

2. Look for a particular linked issue

3.  Transfer the values of a checkbox type custom field from the linked issue to the issue that is being transitioned. (custom field 10174 in this case.  Same field on the linked issue and on the trigger issue).

Note that the there is a very specific linked issue being chosen, so I do not expect this to need to handle multiple linked issues.

--

I have accomplished most of this - my problem is step 3.

Broken down:

1. Use the Lookup Issues trigger on "issue in linkedIssues (etc)" finds the linked issue just fine.  Then I can easily find the value of the checkbox and log it - - {{lookupIssues.customfield_10174.value}}

2. Edit current issue ... how?  The built-in functions do not allow you to "copy value from linked issue" or "lookup issue".   I tried using advanced:

 

{
"fields": {
"customfield_10174": ["{{#lookupIssues}}{{customfield_10174}}{{/}}"]
}
}

or

{
"fields": {
"customfield_10174": "{{#lookupIssues}}{{customfield_10174}}{{/}}"
}
}

 

In the first option, I get an error that the field is not an object.  Section option asks me to specify the value in the array.

{{#lookupIssues}}{{customfield_10174.value}}{{/}} or {{#lookupIssues}}{{customfield_10174.id}}{{/}} or even {{lookupIssues.customfield_10174.value}} subbed in after the colon are also not successful..

I did find this in the documentation: https://support.atlassian.com/cloud-automation/docs/advanced-field-editing-using-json/

 

"customfield_11440" : [{ "value" : "option1"}, {"value" : "option2"}] 

or

"customfield_11440" : [{ "id" : 10112}, {"id" : 10115}]
but I am failing to get my output of the lookup to fit that format.  Also am starting to think it's insane that I am jumping through this many hoops, and maybe there is a better way?
Any suggestions are welcome!

1 answer

0 votes
Erin Blomert
Contributor
November 9, 2022

Wow, crickets!  Maybe I have opened a can of worms with this one?

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events