Automation - apply condition on linked issue

Valerie Blondel
Contributor
October 26, 2022

Hi there !

Automation/JQL beginner here, but willing to learn :-)

Here is my case.  We want to improve the way we manage our trainings and competencies in my company.

We have 2 operating sites : Liège and Saintes.

For each competency, I have an issue in which I would like to sum up the hours of trainings followed on each site + as a group (Saintes+Liège).

The training hours info and the site info do appear in custom fields in the linked Formation issues.

 

Here is what I did so far :

 

Competency issue :

- Set up of custom fields to recup the training hours spent in trainings as a group, in Liège and in Saintes.

Compétence.png

Formation issue : 

- set up of custom fields showing the site and the hours of training.

Formation.png

 

Automations :

- Groupe sum : working :-)

Group sum.png

 

- Liège sum : not working.  It gives me the group total, even with condition Site = Liège.

Liège sum.png

I tried numerous ways to apply this filter, with conditions, with JQL... but none of them seem to work.  What do I do wrong ?

Thanks so much !

1 answer

1 accepted

0 votes
Answer accepted
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.
October 26, 2022

Hello @Valerie Blondel 

I am going to try to echo back to you what I believe you have described as the problem

Issue MRH-22 has multiple other issues linked to it with the causes/is caused by  relationship including 

  • MRH-26
  • MRH-28
  • MRH-35

You want to total the hours for all of these linked issues int one field - GROUPE.

Some of those linked issues have a field - Site - set to "Liege". You want to total the hours for just the linked issues that have "Liege" in the Site field, and store that value in the LIEGE field of MRH-22. 

The problem is that the value you are ending up with in the LIEGE field of MRH-22 is the total of hours of all the linked tasks, not just the ones where the Site field is set to "Liege".

If I have stated that correctly, then you need to change this part of your Rule:

Screen Shot 2022-10-26 at 4.44.40 PM.png

 

The JQL you are using there is selecting ALL the linked issues. If you want to choose only the linked issues where the Site field is set to "Liege" then you need to add this to the query:

AND Site="Liege"

That will reduce the returned issues to only the linked issues where Site is set to "Liege" and should then give you the total hours for only those issues.

Valerie Blondel
Contributor
October 27, 2022

Yay, working, thanks Trudy :-)

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events