Forums

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

How to count in automation rule ?

PARISATO Marie-Hélène
Contributor
May 31, 2024

I have to count how many issue linked have an issue regarding some criteres.


Every morning i have an automate rule that works. She have to count for each issue from a projet how many issue linked are linked, how many are closed, how many are are still opened and the rule have to close the issue if all of the linked issue are closed. 
But it's doesn't work. 

Could you help me ?

See below the detail of the rule and the explanation and my attentes. 

2 answers

0 votes
John Funk
Community Champion
May 31, 2024

Hi Marie-Hélène 

Let's see what we can help you with. 

My first thought is you can get much of this information by simply doing a Dashboard and displaying that information. It does really good with counts. Create your filters that you need for the total issues then you can do an Issue Statistics gadget in Jira and do counts by Status or Assignee or other fields. 

Another option is to use lookupIssues functionality get counts and put them in your custom fields - assuming you have custom fields for each created that are number type fields. My Fresh is not good enough to tell if that is what you have or not. 

Can you list here the Custom fields that you have and the JQL you need to populate each one? 

PARISATO Marie-Hélène
Contributor
May 31, 2024

Hi John.

 

First thanks a lot for your answer,

 

use dashboard is not helpful because i have to use those counts to move issue from status to another.
And my user want to see on each issue those counts

 

I try to use smart value but i don't know how i should do. 
Yes i have on issue of the project CAB number customfield to stock the count.

PARISATO Marie-Hélène
Contributor
May 31, 2024

could i use jql request in llokupissue functionnality ? 

PARISATO Marie-Hélène
Contributor
May 31, 2024

example of one counter i have to populate :

 

counter issuerejected : where "CAb-décision" = rejetée

PARISATO Marie-Hélène
Contributor
June 4, 2024

update du 04/06/2024

j'ai testé les smarts values, j'ai trouvé pour compter mais je n'arrive pas à compter en fonction de critères :

Mon exemple : Ticket lié à  12 tickets, 11 des tickets liés sont acceptés, 1 des tickets liés est rejetée, 11 des tickets liés acceptés sont livrés.

Pour rappel , je dois :

- compter le nombre de ticket total    :  j'ai créé une valeur et y ai affecter la formule :                      {{issue.issuelinks.size}}   c'est OK

- compter le nombre de ticket dont la valeur du champs Décision = acceptée : j'ai créé une valeur et j'y ai affecter la formule :  {{issue.issuelinks.inwardIssue.customfield_10241.value.match("Acceptée").size}}  = au début ça semblait ok, jusqu'à ce que je fasse la suivante : 

- compter le nombre de ticket dont la décision du champs Décision = rejetée : même procédure que précédent mais avec la formule {{issue.issuelinks.inwardIssue.customfield_10241.value.match("ValeurSpécifique").size}} (vous noterez que je n'ai mis aucune des 2 valeurs de mon champs personnels doit prendre , juste pour voir si la comparaison fonctionne). 

Et là c'est le drame, les 2 me donnent la même valeur. 

Donc, en gros ça ne fonctionne pas. 

 

Inutile donc de continuer pour le moment car je dois aussi :

- compter le nombre de tickets acceptés et livrés (Décision = acceptée et phase de vie du ticket (livré ou clos)).

Vais encore voir demain si en combinant Chatgpt et la doc sur les smarts values et une éventuelle réponse......

0 votes
PARISATO Marie-Hélène
Contributor
May 31, 2024

rule count and change.PNGrule count and change2.PNGrule count and change4.PNGrule count and change3.PNG

PARISATO Marie-Hélène
Contributor
May 31, 2024

rule count and change1.PNG and the result of execution : i don't understand what the rule is doing. The bgin i understand but not after. rule count and change5.PNG

PARISATO Marie-Hélène
Contributor
May 31, 2024

What does my rule do ? (what i want my rule should do)

For each issue in project CAB (for my trying i select only one issue), 
          for each issuelinked of the issue CAB i count how many issue linked this issue has and i update my issue CAB
          For each  issuelinked of the issue  CAB i count how many est rejected and i update the issue CAB

         for each issuelinked of the issue CAB i count how many are agreed and i update the issue CAB

         for each issuelinked of the issue CAB i count how many are agreed and closed (=delivered) and i update the issue CAB

At the end the issue CAB should show that : 

            -  rejected issue linked = 1 , i have 0 <= KO

            -  issue linked = 12  i have 11 (maybe is this because one ticket is linked to 2 CAB ?)

           - issuelinked agreed = 10, i have 11 <= KO

           - issuelinked delivered = 8, i have non <= KO

PARISATO Marie-Hélène
Contributor
May 31, 2024

i'm consciensous that i'm really beginner in rule automation and smart value , i didn't have training. Please help me. 

Suggest an answer

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

Atlassian Community Events