hello, we are trying to make a rule that is executed whenever there is a modification in a field of a subtask.
The rule consists of performing an operation on a smart field. In this case, the "progress percentage" field of a task must vary according to the value of the "progress percentage" of its subtasks.
In a scenario of a task with two associated subtasks, the operation should be:
(subtask 1 progress percentage*originalestimate subtask 1+subtask 2 progress percentage*originalestimate subtask 2)/(originalestimate subtask 1+originalestimate subtask 2).
We add a screenshot of the standard as it is, but we still need to complete the additional fields section:
Hi @Oficina de Proyectos -- Welcome to the Atlassian Community!
To gather the information from your subtasks, please review the Lookup Issues action and List functions:
https://support.atlassian.com/cloud-automation/docs/jira-automation-actions/#Lookup-issues
https://support.atlassian.com/cloud-automation/docs/jira-smart-values-lists/
Using JQL you may gather all of the subtasks with the same parent as your trigger issue into the {{lookupIssues}} smart value, and then you may use the list functions to perform the math operation you note.
If you need any temporary storage to compute the fields, please review the Create Variable action to store those:
https://support.atlassian.com/cloud-automation/docs/jira-automation-actions/#Create-variable
Kind regards,
Bill
Hi @Bill Sheboy, thanks for your help
We have tried to perform operations using lists, but the final result is not satisfactory.
First of all, we have created the variable "operation".
Then, the variable "sum".
Finally, the variable "FinalValue".
Then we call the result value and we get the following error
Could you please help us solve this problem?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
There are two ways to perform most of the math operations with smart values:
Inline with dot-expressions:
{{issue.myFieldA.multiple(issue.myFieldB).divide(10)}}
With the {{#=}}...{{/}} syntax. The equivalent of the above would be:
{{#=}} {{issue.myFieldA}} * {{issue.myFieldB}} / 10 {{/}}
Please look here for more details on these methods:
https://support.atlassian.com/cloud-automation/docs/jira-smart-values-math-expressions/
Also please note: there is a typo in your FinalValue created value expression where "aggregate" is misspelled.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.