Dear community,
I have a parent work item with 4 custom fields:
This parent has 2 child work items that include the same 4 fields.
When I update the 2 Evaluation related fields in the 1st child work item, the values are copied into the parent.
When I update the 2 Decision related fields, the values are copied into the parent BUT removes the values of Evaluation related fields. I realized this happened because in the 2nd child work item, the Evaluation related fields are empty.
Here is my Automation Rule:
I then updated the Change type to: Value added for all work item operations. The result remains the same.
I tried using "If..Else" and inside each condition moved the Branch (For Parent) and the Action. However, since I have 4 conditions, once the 1st condition is met, the Rule stops evaluating the remaining conditions.
What I want is for the 4 conditions to be evaluated so the updates to the field, where appropriate, can happen.
In the meantime, I split this 1 rule into 4 to ensure each field is evaluated independently. However, I thought I can just have one rule to get these field changes to work.
Thank you for your help!
Doods
Hello @Doods Perea
Is there something about the child items that will distinguish them from each other, but that remains the same for all child items of that type? For example do all child items #1 contain "Project Evaluation" in their summer and all child items #2 contain "Project Decision"?
Are you working within a Company Managed Space where it is technically possible to have multiple types of subtasks? Or are you working in a Team Managed Space where only one type of subtasks is permitted?
Will the 2 Evaluation fields always be blank in the Decision subtask and the Decision fields always blank in the Evaluation subtask?
If you are not limited to only one type of subtask and if the answer to my last question above is Yes, then I would recommend that you implement a custom subtask for Project Evaluation and a custom subtask for Project Decision. Then add only the relevant fields to each type of subtask, and restructure your rule as follows:
TRIGGER: When value changes for <your 4 fields)
FOR EACH: Related issue/Parent
CONDITION: Advanced/smart value
smart value: {{triggerIssue.type.name}}
comparison: equals
value: Evaluation
ACTION: Edit work item
Evaluation Date: Copy from Evaluation Date field of Trigger Issue
Evaluation Status: Copy from Evaluation Status field of Trigger Issue
FOR EACH: Related issue/Parent
CONDITION: Advanced/smart value
smart value: {{triggerIssue.type.name}}
comparison: equals
value: Decision
ACTION: Edit work item
Decision Date: Copy from Decision Date field of Trigger Issue
Decision Status: Copy from Decision Status field of Trigger Issue
Branches execute in parallel, but since each has a condition where only one of them should be true, theoretically this should work to update the parent's Evaluation fields from only the Evaluation subtask, and the parent's Decision fields from on the Decision subtask.
If you can't have multiple types of subtasks you can change those conditions to evaluate something else, like the Summary, or the subtask that is different between the pair of subtasks but the same for all the subtasks across all parent items.
I have not actually set up this scenario and run through it, but the theory is sound.
Hi @Doods Perea
You could do an IF\ELSE conditions and branch in the edit action in the branch in the IF or ELSE, make sure to only include the fields that need to be adjusted.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Marc - thanks for your response. I did this already. The problem with IF/ELSE is when a condition is already met, the Automation Rules stops evaluating all the other segments in the statement.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Doods Perea
That is correct, this you can't as your only base is on a single condition.
Then your 4 rule option is the best way to go, or you need to set in the IF/ELSE per condition which field changed, but this might result in a multitude of else clauses.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Doods Perea can you share a screen shot of the automation and automation steps. This will make it easier to troubleshoot and help you out.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Brant - thank you.
I will re-create the original rule later, as I have already broken it into 4 rules, each evaluating 1 field to ensure the other 3 are not included when the rule runs.
This approach works for me. I just thought maybe there is a way to keep just 1 rule for all 4 fields.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.