Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Automating the creation of Epic Links triggered by a custom field change for field called issue_key

Jordin December 3, 2022

Hi all,

I am working on some more complex automation due to the lack of features of a Jira integration I setup. I am really stuck!

I would like to use automation to reference a field trigger when the field changes, query for that field input (should be an issue id) and then create an epic link to that issue id 

Note: The issue id (issue_key) is being manually entered on the vendor side and then will carry over to a field called "issue_key" when an issue is created via the Jira integration with the vendor.

Perhaps there is a better way but I figured it was worth getting other input on how to tackle this.

2 answers

1 accepted

0 votes
Answer accepted
Trudy Claspill
Community Champion
December 3, 2022

If I have understood your requirement correctly, this rule should work. This assumes the issue that has the "issue_key" field is in a Company Managed project, as the Epic Link field is not used in Team Managed projects.

Screen Shot 2022-12-03 at 12.16.18 PM.png

Jordin December 5, 2022

Thank you for your response! I found that with some tweaks this rule works, but only when I manually update the issue_key field. Which is great if someone linked the wrong epic and needs to fix it.

To tackle this I copied the rule and changed the trigger to be When: Issue created 

Looking in the audit log I now see that field value for issue_key is nested in ' ' do you know how to remove those before the final step of editing the "Epic Link" field?

 

EDIT: looks like the first version of the rule did work it just took some time to run. However, the same error occurred and I will still need to remove the ' ' around the value.

Trudy Claspill
Community Champion
December 5, 2022

What do you mean that the value is getting nested in quotes? Can you provide a screen image?

Like Jordin likes this
Jordin December 6, 2022

Screen Shot 2022-12-06 at 8.58.20 AM.png

Trudy Claspill
Community Champion
December 6, 2022

Can you show me a screen image of the issue PROD-2120 showing the issue_key field?

Can you show me a screen image of PROD-562 showing that it is an Epic type issue?

Also, note that having the Lookup Issue action is not useful if you are not going to check the output to confirm that the Epic you were trying to use actually exists. Notice in my example I have a component after the Lookup to check the size of the results set. If the size of the results set is not 1, then an Epic with the specified key was not found.

Jordin December 6, 2022

Screen Shot 2022-12-06 at 2.13.44 PM.pngScreen Shot 2022-12-06 at 2.15.30 PM.png

Jordin December 6, 2022

To your note that makes sense. I am doing the testing so I know that it is an epic, I would likely add that to my rule once it goes live.

Trudy Claspill
Community Champion
December 6, 2022

I would like to confirm whether this is a Team Managed project or a Company Managed project. Can you show us a screen image of the View All Project list showing this project in that list and the column that indicates where it is Team or Company Managed?

Also, can you show use the configuration of the issue_key custom field? I would like to confirm the type of field it is.

So far I am not able to recreate the scenario that you are experiencing, so I think there must be something different in the configurations we are using.

Jordin December 7, 2022

It is a company managed project, I understand the limitations there and avoid team managed projects at all cost.

The issue_key is a single line text field.

I may just have to contact support.

0 votes
John Funk
Community Champion
December 3, 2022

Hi Jordin,

I am a bit confused of your actual process. Can you provide a more detailed step-by-step what is happening and what you hope to accomplish? 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events