Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How to update some custom field in task from JQL with a sub-task specific condition

Marco Atturio June 9, 2023

Hi Experts! :)

I have created several automations that add up the days of these split by component of the various sub-tasks, now these automations work correctly, and they start automatically any original estimate of a sub-task is edited it is updated on the relative parent task with the sum of the days of all the sub-tasks that have a certain  components.

 

I'm posting the screens from the automation that works and that fires when I modify when any sub-task (in this example I'm going to update the  "Gu Cedacri "custom field in task. Which contains the sum of the original estimates of the sub-tasks with "Cedacri" components for that specific task )

Now I will to make an new automation that triggers manually that goes to update ALL the tasks massively based on specific sub-tasks condition, this would be used to update the Gu "component name" fields (eg: Gu Cedacri, gu customtool etc ...) for all existing tasks.

 

I write here what I would like to do specifically:

 1) I retrieve a certain number of TASK  with a JQL (e.g.: project = COMPANIES and issuetype = Task and status != Closed)

2) Loop\iterate on those tasks and for each task I go to do the sum of the original estimates present in the sub-tasks connected with the same component (e.g. task 1 has 3 sub-tasks of which 2 with Cedacri component and 1 with customtool component)

3) I get the sum of the days of those with Cedacri component and update the custom field present on the TASK  “gu Cedacri” (if it were possible to update the other components as well (e.g.: gu customtool with the sum of the customtool components separately in order to create a single automation)

4) End of the cycle

Immagine 09-06-23 - 11.06.jpegImmagine 09-06-23 - 11.07.jpeg

 

1 answer

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.
June 9, 2023

Hi @Marco Atturio 

From what you have described, you likely have all of the pieces you need to build such a rule.  What have you tried thus far to do this?

Please note: rules have service limits to processing, so if you have many tasks (or many subtasks per task), the rule could exceed the limits.  Please look here for more information: https://support.atlassian.com/cloud-automation/docs/automation-service-limits/

I suspect your basic rule would be something like this:

  • trigger: manual
  • branch: on JQL for the tasks
    • action: lookup issues to gather the subtasks...or access them directly using the subtasks smart value
    • action: edit the task for a specific issue Component, using the smart value list filtering and list functions
    • ...repeat for each possible issue Component

If you instead want a rule which could dynamically iterate over the components AND iterate over the tasks, that may not be possible as the rule would need nested branching...which is not a feature of rules.

Kind regards,
Bill

Marco Atturio June 19, 2023

Thank you @Bill Sheboy ,

have been very busy during this time and I could not try your suggestion, 

I will try as soon as possible and give you feedback

Like Bill Sheboy likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events