Jira Automation get count of issues using label having different values (For ex: SIT, UAT)

Sridhar Gandla
Contributor
December 18, 2024

Jira Automation get count of issues using label having different values (For ex: SIT, UAT)

I am using a Jira Data Center and Jira Automation works perfectly fine. JQL results 10 Jira Cards; SIT Label exists for 4 Jira Cards & UAT Label exists for 6 Jira Cards

When I print Issuecount smart Tag, it always prints 10 but I want to print counts seperetly.

I am using two If statements i.e. one for SIT Label & Second If Statement for UAT Label. 

I am looking for issue count based on label inside if statement when I am using Jira automation.  

Actual problem:  

  • 1st If loop is for SIT Label,  (Actual count is 4):  when I print Jira keys then it is printing 4 correctly different Jira Keys correctly
  • 2nd If loop is for UAT Label, (Actual count is 6),  when I print Jira keys then it is printing 6 different Jira keys correctly.

I am using Issue count with in in the first and or Second If condition when I print Issuecount variable then it shows 10 only. 

Even outside of two if loops also it print 10 count. All I am using single variable for issuecount throughtout  Can I use two different variables to catpure Issuecount..  

I want to print exclusively SIT, UAT Issues count.  Can some one have code sample that count shows based on label

2 answers

0 votes
Sridhar Gandla
Contributor
December 18, 2024

I am looking for issue count based on label inside if statement when I am using Jira automation.  

0 votes
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 18, 2024

Hello @Sridhar Gandla 

To enable us to advise you on how to change your rule please provide the following:

1. Screen images that show your entire rule.

2. Screen images showing the details of the steps where you create and use the variables.

3. Show us the output of the rule execution in its Audit Log.

4. Tell us what version of Jira Data Center you are using.

Sometimes unexpected behavior in an automation rule is due to the context of the step. We can't assess that without seeing the entire rule.

What is the exact trigger that you are using? I don't see anything called JQL Fetch in the documentation:

https://confluence.atlassian.com/automation/jira-automation-triggers-993924804.html

Are you are using a Scheduled trigger that executes a JQL?

What structure are you using for what you are calling the "if loop"? A4J doesn't actually support "loops". There is a construct called a "branch" that operates as a "for each value do actions" structure.

If you are using a Scheduled trigger followed by If conditions then that would execute the If conditions for each issue retrieved by the trigger, simulating a "loop".

 

Without more information about the details of your rule it is difficult to provide suggestions about how it should be changed to achieve your requirement.

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 18, 2024

Hello @Sridhar Gandla 

Without the screen images I requested in my previous reply we are unable to to help you effectively.

Sridhar Gandla
Contributor
January 18, 2025

I am using issue count smart value.  I wrote code in Jira automation admin screen provided by Jira Project Admin then Automation. 

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 18, 2025

Without the screen images I requested in my previous reply we will not be able to determine why your rule does not work as you want it to. Nor will we be able to tell you how you need to change it to make it work.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events