Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Automation rule to link issue to an item in a different project when a fix version has been added

Gile Empey July 19, 2024

We are using cloud and I am working on building out a release management project. Ideally what happens is that when a fix version gets created in our software project (where teams are sprinting and writing code), a release ticket will get created to track this work for releasing to production. 

I have automation working to create this new ticket, but what I can't figure out is how to link an item to this same release ticket when that same fix version gets added on the software project. 

Not sure if this is possible, but I am open to other solutions or recommendations as well.

1 answer

3 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.
July 19, 2024

Hi @Gile Empey 

Rules with a single-project scope may create (or clone) issues into other projects, but not otherwise access or update them.

When a rule needs access to issues in multiple projects, it needs to be multiple-project or global in scope.  To enable this, your Jira Site Admin will need to configure the rule in the global automation area.

 

With scoping handled, I recommend mapping out which events happen to trigger the different things...and then identify the rules needed.  I suspect you need at least two rules:

  • your existing rule: triggered on Version Created in the software project, which then creates a "release ticket" issue in the release management project
  • another rule, with multiple-project scope, where...
    • triggered on a change to Fix Version when a value is added
    • use Lookup Issues with JQL to identify the "release ticket" in the other project
    • use that information to link the issues

Please note well: this is the "happy path".  If you want to also handle removal of Fix Versions from software project issues, or manual tampering with the links in the issues, additional rules will be needed, and likely be brittle.  (They could be brittle because there is an open defect that if the Fix Version field is changed too much, the changelog becomes inaccurate: https://jira.atlassian.com/browse/JRACLOUD-80486)

Kind regards,
Bill

Gile Empey July 22, 2024

Thanks for your reply @Bill Sheboy

I am a site admin and already have the first rule and configuration set up to create a "release" ticket, but I am not following the other rule you mention fully. My options are limited when using the trigger for the value changing on a given ticket. There's no way to link it to that release ticket.

Screenshot 2024-07-22 090224.png

I believe you are recommending adding an IF after the trigger for some JQL, but how am I going to match these together via JQL? I can't see a way to write this query that will give me what is needed in order to link the item to the newly created "release ticket" in the first rule. Any help here would be great.

Thanks.

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.
July 22, 2024

Using the changelog / fieldChange smart values to detect the added fix version value, you may then create a JQL statement to find the release management issue in the other project.  Use that JQL with the Lookup Issues action to get the release management issue's key.  Then use that issue key to create a JSON statement to link to the trigger issue.

Here are the references you need for the parts of that:

 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events