Hello community,
I'm trying to set up an automation rule so that when a Task (red) is created, it automatically copies specific field values from the related Requirement (green).
Trigger: Work item created
Then a condition: Request Type = Tarea SC
After that, I use a Branch rule with a JQL query to find the related Requirement (via the "is blocked by" link type).
Inside the branch, I use an Edit work item action to copy values from several custom fields.
When the Task is created, the following fields should be automatically filled with values from the Requirement:
Nombre de Requerimiento
Frecuencia del Requerimiento
Vía de Entrega del Requerimiento
These fields remain empty. They show up as “None”.
A screenshot of the Task showing the empty fields
A screenshot of the linked Requirement, where the fields are properly filled
Am I missing something in the rule logic?
Is it possible that the way I'm referencing the linked issue's fields is incorrect?
Any guidance or suggestions would be greatly appreciated.
the JQL that is not working apparently:
issue in linkedIssues({{issue.key}}, "is blocked by") AND "Request Type" = "Requerimiento SC"
👉 Final note: The automation doesn't necessarily have to follow this exact sequence of steps. My main goal is for the “copy” fields in the Task to inherit the values from the original fields in the linked Requirement.
If anyone suggests a simpler or more effective approach, I’d be happy to consider it.
I may be mistaken, but if I understand your use case correctly, I have the impression that you are making things overly complex.
Assuming that you just want to copy values from a newly created work item from a linked work item from type requirement, you can use a smart value to refer to that specific requirement item to copy values from.
In your rule, you are trying to use a {{lookupIssues}} smart value, but:
I have a sample rule in a test environment of mine that looks like this:
It uses the link to another item to determine where to get its source data from and the built in function Copy (field value) from destination work item to locate the linked work item as a source for the data.
It could be that you could simplify your copy logic very much in the same way to achieve your goal.
Hope this helps!
This topic appears to be a duplicate of the one you already started here
I will stop responding on that Question and start contributing here. In the future it would be better if you did not make multiple Question posts for your topic as it makes it more challenging for the responders to built off of each others replies.
Here is my reply copied from the other post:
Hello @Sebastian Santoyo
As I mentioned in my previous reply, please show us the output in the Audit Log for the rule. That will provide critical information needed to debug your issue.
Green Field | Green Field Type | Red Field | Red Field Type |
Frecuencia | Single Select List | Frequencia de Requerimiento | Single Select List |
4. Are you trying to do a straight copy of data? If so, what do you expect to happen if the linked issues have different values from each other?
If the answers to 1 and 2 are "Yes" then your rule is not structured correctly.
When you use a BRANCH (For Each) component and nest actions under it, as you have done with the Edit action, the nested actions are taken against the issues you selected in the BRANCH, not the issue that triggered the rule. So, the Edit action is trying to edit the issues found by the JQL.
Additionally you tried to use the smart value {{lookupIssues}} in the branch to get the value you want to copy. The {{lookupIssues}} smart value is only populated when you use a Lookup Work Items action, which you have not done.
When you more fully describe the details of the fields and scenarios I will be able to offer you more specific guidance.
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.