Forums

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

Jira Automation rule

Eswar Tucha May 30, 2023

Hi,

We have below requirement:

Sum of 2 number fields(field1 & field2) in subtask should be updated in parent task field (Field3).

Example: 

Field3(parent) should only get updated when sum of field1(subtask) and field2(subtask) is greater then field3(parent).

Example with field values:

Field3: 10

Field1: 7

Field2: 7

In this case, sum of 2 subtask field values (14) is greater then Field3(parent), then it field in the parent issue should update.
If sum of 2 subtask field values is lesser than Parent issue field value, then the parent issue field should not get updated.

 

Automation rule written:

sum of 2 values.png

2 answers

1 accepted

1 vote
Answer accepted
Trudy Claspill
Community Champion
May 30, 2023

Hello @Eswar Tucha 

Welcome to the Atlassian community.

Does your scenario consider that the parent issue may have multiple subtasks? It seems like you are describing a scenario where the parent issue could be updated repeatedly for changes based on a single subtask when it may have multiple subtasks.

Would it not make more sense to sum the effort information of all the subtasks to see if that is greater than the effort estimated for the parent task?

Also, I see from the rule that you have shared that the fields you are looking at are Actual Dev Effort and Planned Dev Effort. If you add those two fields together you are getting more "effort" time than is either planned or actually expended. Why would you want to add Planned and Actual together?

Eswar Tucha May 30, 2023

Hello @Trudy Claspill 

Yes, parent issue will have multiple subtasks. Effort on parent task should only get updated if sum of 2 effort fields in subtask is greater than effort on parent task.

Why would you want to add Planned and Actual together? - These are sample fields that we are using in sandbox, field names would change later.

Let us consider Planned and Actual are subtask fields and Code review is Parent task field with not much bothering about names of the fields.

Also, these number fields should not take negative values. 

Please help

Trudy Claspill
Community Champion
May 31, 2023

There is more than one way to achieve your requirement. This is how I would do it.

TRIGGER: When field value changes (specifying the fields in your subtask)
CONDITION: Issue type = subtask
BRANCH: For Parent
CONDITION: Advanced Compare
First Value: {{triggerIssue.<custom field 1>.plus(triggerIssue.<custom field 2>)}}
Operator: is greater than
Second value: {{issue.<custom field 3>}}
THEN ACTION: Edit issue
Field: custom field 3
Value: {{triggerIssue.<custom field 1>.plus(triggerIssue.<custom field 2>)}}
0 votes
Sanjog Sigdel
Community Champion
May 30, 2023

Hi @Eswar Tucha 

I don't have the answer for this question. But my curiosiry is on the change request here. Can you please share the Use Case of such requirement and what you want to achieve out of this?

I've so far been able to implement the following:

  1. Updating the sum of Total Story Points under an EPIC,
  2. Total Story Points completed in an EPIC
  3. Total Story Points Remaining under an EPIC.

You can find how I did it in this question:
Error-while-using-lookupIssues-JIra-Smart-Value-to-sum-story

 

This helps me to view the Progress on EPIC. But that is the use case of Subtasks less than greater than and sum in some if case.

Eswar Tucha May 30, 2023

Hi @Sanjog Sigdel 

Our goal is to calculate the efforts wherein different users work on child issues and updates their efforts.

Hence, sum of efforts in subtask should update in parent issue only if the efforts are greater than parent issue, so that we can plan the effort for issue accordingly.

Like Sanjog Sigdel likes this
Sanjog Sigdel
Community Champion
May 30, 2023

 

Oh I see @Eswar Tucha. Will your automation capture the following scenario?
"I estimated a ticket would take 5 hours to complete. Then the team members logged their hours in their respective sub-tasks. It happen to be a total of 4.5hrs."

Shouldn't we capture that and update the original estimate? Or log the total effort it took to complete a ticket?

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