The following advanced JSON block is not working if the subtask has the default values set on creation. It shows success but it doesn't work, the values are not copying and keeping the default values. The automation using this JSON works though if you update the parent, then the values are copying to sub-tasks.
the select cascade field is common for other projects so I don't want to change the default value for subtasks
{ "update": { "Sample Cascade": [ { "set": { "value": "{{triggerIssue.fields.Sample Cascade.value}}", "child": { "value": "{{triggerIssue.fields.Sample Cascade.child.value}}" } } } ] } }
Would you please show images of your complete rule and audit log details for context? That may help the community to offer ideas. Thanks!
Until then, if you are using the issue created trigger I wonder if this is a timing issue with the event firing before the data is available. The way to check that is to add a Re-fetch action after the trigger to slow the rule a bit.
Kind regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, Natalia, and thanks for that information.
Would you please clarify what you are trying to update? Your rule shows updating the trigger issue with the same values from itself. (There is no branching to other issues.)
Which are you trying to accomplish?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Bill, I knew i am missing something.
2. Update the subtask from parent
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks, and in that case you can probably simplify your rule:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Bill, yes it is easy if i had an option to copy the cascade field from parent but the cascade fields can be set only with JASON block. I am missing something: another if statement or diff JASON...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sorry, I don't use that field type often and forgot that. There is a suggestion to add built-in support for those field operations: https://jira.atlassian.com/browse/JRACLOUD-74280
Until that is available...
The work-around if you are using Jira Cloud is to branch and capture the parent values for the field in created variables. And then use those directly in the JSON edit on the sub-task.
If you have Server/Data Center, it does not have created variables. In that case I would suggest inverting the problem: add an indicator to the parent issue, telling it to update the specific sub-task. (Perhaps with a comment for the sub-task key.)
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.