Forums

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

How to update number of linked issue using automation?

jun lee
Contributor
February 16, 2023

I want to make an automation rule like below.

when : issue linked

condition 1 : linked issue type id = 10511, 10612, 10603

condition 2 : linked id = 10309, 10703

condition 3 : linked issue status = completion

issue edit : (number of condition1 & condition2 & condition3) / (total number of condition1) x 100

 

How can I do that?

 

2 answers

0 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.
February 17, 2023

Hi @jun lee 

Perhaps to re-frame the question: what problem are you trying to solve by doing this?  Knowing that may help the community to offer suggestions.  Until you share that information...

With Jira Server/Data Center, I believe you will need to experiment to determine if this is possible.  The reason I suggest that is...

  • Jira Server/Data Center automation does not have the action Create Variable, and so you will need to either perform this in a single edit action, or repeatedly test your conditions and then store the intermediate results in custom fields, followed by re-fetch actions, for later calculation.
  • Testing the link types may not be possible in a rule, as I do not believe smart value, list filtering is available for Server/Data Center automation.  You may discover a way to do this with bulk-handling with a branch.
  • Your third condition may be a challenge, as it appears to be testing the status of the issues which are linked.  I do not know how much data Jira loads for each linked issue within the rule.  It obviously does not load *all of it*, or a single issue could drag in an entire Jira instance through a chain of links.  You will need to test if the linked issue status values are even available to test.

Kind regards,
Bill

jun lee
Contributor
February 19, 2023

Hi

Ultimately, I want to calculate the progress percent as (number of condition1 & condition2 & condition3) / (total number of condition1) x 100 to the Gantt Chart. I thought that the automation rules could be the solution. 

If you know another solution, let me know.

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.
February 19, 2023

Thanks for the additional details.  I do not believe that would be possible with the built-in features.

0 votes
Alex Koxaras _Relational_
Community Champion
February 17, 2023

Hi @jun lee 

You have to be a bit more thorough about your rule. I'll give you an example:

  • Trigger: Issue linked
  • Condition: If issue type of linked issue is ANY (or ALL) of 10511, 10612, 10603
  • Condition: If the link type id is 10309 or 10703
  • Condition: If the status of the linked issue is "Completion"
  • Action: Edit issue -> Which field is to edit? Which numbers are going to be placed on that expression of yours? (number of condition1 & condition2 & condition3) / (total number of condition1) x 100
jun lee
Contributor
February 19, 2023

Hi

I can configure trigger and conditions like attached file, I want to know how to set (number of condition1 & condition2 & condition3) / (total number of condition1) x 100 to the custome field. I want to calculate and update field.

 

How to calculate (number of condition1 & condition2 & condition3) / (total number of condition1) x 100?

If it is not possible, can I calculate (number of completed linked issue) / (total linked issue)  x 100 ?

2023-02-20 08 20 27.jpg

Suggest an answer

Log in or Sign up to answer