Jira Automation - copy Parent Link from trigger issue

Ryan Eaglen March 29, 2021

I'm looking to figure out if there is a way I can copy the Parent Link from a trigger issue to a new issue created by Jira Automation.

The custom field for this in our instance is customfield_13801

I've tried adding the following as an edit issue action but not getting any joy:

{
"fields": {
"customfield_13801": {{triggerIssue.customfield_13801}}
}
}

 

2 answers

1 accepted

1 vote
Answer accepted
Ryan Eaglen April 7, 2021

Atlassian support actually solved this one for me - they did an amazing job. Posting it below should anyone else attempt the same thing!

 

I understand... you are trying to copy over the Parent Link custom field to a new issue, however, the parent link value is not available on the new issue key. Hope my understanding is correct.

Please note, Parentlink field has a unique way to store the data. The below JSON expression would help you fetch the data and can be used for an edit issue action.

{
    "fields": {
        "customfield_<>" : "{{issue.customfield_<>.data.key}}"
    }
} 
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 7, 2021

Thanks, @Ryan Eaglen 

Now THAT is a curious, and undocumented, syntax.  I wonder if it will keep working in the long-term...  I also wonder what other undocumented fields are available via that data attribute.

I suggest that you ensure the rule details settings are enabled to notify you if that rule starts failing.

Best regards,

Bill

0 votes
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 29, 2021

Hi @Ryan Eaglen 

  • Would you please provide an image of your complete rule for context?
  • Are you getting errors in the audit log? 
  • What is the type of the custom field?
  • Have you tried enclosing the trigger issue's value in quotation marks?
{
"fields": {
"customfield_13801": "{{triggerIssue.customfield_13801}}"
}
}

Best regards,

Bill

Suggest an answer

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

Atlassian Community Events