Jira Rule to Collect Isueses Components in Fix Version.

Arseni Vasilevski
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 17, 2024

Hello, experts!

I want to create the following Cloud Jira Rule:

  1. I open one of the tickets in Jira Release. 
  2. Go to Automatisation and run Manual Rule "get components" 
  3. Jira identified the current Fix Version (from the current.issue)
  4. Find all tickets with Fix Version = Fix Version of the current issue.
  5. Go throw all the tickets with this Fix Version and collect All Components.
  6. Remove duplicates and Put all components in the comment below the ticket. 

 

Context:

We use Jira Components as GitLab Repositories' names. It helps us to collect all Repositores that need to be Deployed to Prod in this Fix Version. 

Usually, I go to the issue navigator and manually collect all components then inform DevOps, but it leads to risks of human error and duplicates. 

Spend 3 hours playing with Smart Values and Lookup table, but unfortunately failed even with ChatGPT. 

2 answers

1 accepted

2 votes
Answer accepted
Kalyan Sattaluri
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 18, 2024

Hello @Arseni Vasilevski 

Welcome to the community. I am guessing you know how to do until step 4, that is lookup issues based on fix version of the issue of manual trigger. 

So once you have lookupIssues, you create a variable (myvar) then you can assign it all the components found in lookup like below:

{{#lookupIssues}}{{#components}}{{name}}; {{/}}{{/}}

 

image.png

 

This variable (myvar) is a text, you need to split it and convert to list and do a distinct like below:

{{myvar.split("; ").distinct}}

So, after lookup Action, you can do

  • Action - edit comment with value = {{myvar.split("; ").distinct}}

Hope it helps.

Arseni Vasilevski
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 18, 2024

@Kalyan Sattaluri 
That is amazing, you inspired me to help others. Thanks! 
No duplicates and works perfectly! 

Get components.pngResult.png

Like Kalyan Sattaluri likes this
0 votes
Stephen Wright _Elabor8_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 17, 2024

Hi @Arseni Vasilevski 

I got most of the way there - I just haven't found a method to de-duplicate yet. But I did get the components to post into a comment.

I've assumed there's only one Fix Version on the trigger issue.

---

  • Trigger: Manual triggert from issue
  • Action: Lookup issues
    • JQL - fixVersion = {{triggerissue.fixVersions}}
  • Branch: Related Issues
    • Type = Current Issue
      • Branch-Action: Comment on Issue
        • Comment = 
          • {{#lookupIssues}}
            * {{components.name}}
            {{/}}

---

Did you find a method to de-duplicate by chance?

Ste

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events