I am trying to update a cascade custom field in an issue by copying data from the issues epic. The field is context formatted with a default setting for the value. I get successful executions on the rule, but what happens is that instead of copying data from the epic, the context data is removed and the field is blank.
Any suggestions?
Automation setup below (the field is named Process):
WHEN: Issue Created
IF: Related Issue: Epic
Condition: Exists
THEN:
{
"update": {
"Process": [
{"set": {"value": "{{issue.parent.fields.Process.value}}",
"child": {"value": "{{issue.parent.fields.Process.child.value}}"}
}}
]
}
}
This JSON worked for me:
{
"update": {
"CascadeFieldName": [
{
"set": {
"value": "{{issue.epic.fields.CascadeFieldName.value}}",
"child": {
"value": "{{issue.epic.fields.CascadeFieldName.child.value}}"
}
}
}
]
}
}
Reference (Smarter Smart-Values!): https://blog.codebarrel.io/synchronize-parent-and-sub-task-issues-with-automation-for-jira-bdcca6c9d453
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Krister - If you want to retain the current value and just append the new value in, then place {{issue.Process}} before the new value. That way it will keep the current value and add the new value. Of course, you can switch the order around if you want the new value first.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The value stated in the epic should replace any value in the child issue. The current value should not remain, i mentioned it having a value through the context partly if it can have an effect since this takes place at the time of creation and the thought was that there may be an issue where they collide or something. The other part of mentioning it is that it shows that something does happen it does not however copy the values as intended.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Cascading fields are not supported by the standard field update as far as i have been able to find.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ah, that makes sense then.
What type of project is this?
I assume that you are firing this on the child getting created and you want to copy down the value from the Epic. Correct?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Entirely correct, this is a scrum project and the field is one of many metrics that are filled out which we want to be inherited as default to reduce time and errors in the issue creation process. In 90%+ of the cases the issue should have the same as the epic so making it default to that would reduce the amount of errors. Simply setting it as a mandatory field gets us the data but it has a much higher error ratio.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I also know that its possible create this solution with the workflow but there is two issues with that.
The first being that this is a standardized system with multiple projects using the same workflow so its not always the case that we want this rule to fire. To the greatest extent possible using automation is therefore the go to solution for adapting projects.
The second issue is that this is just the first part of the rules that we intend to create there will be if statements and different cases where it will do other things, I just thought to keep the question simpler by not having that extra complexity.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Since you are populating 90% plus with the Epic data, why not add automation to Clone the Epic to another Issue Type, and then Edit the Clone?
Just as a side note, there is no Scrum type of project, just Scrum boards. Project types are either Classic Software or Next-gen in this case.
With Classic Software, I would try the Epic Link instead of the Parent. But for Next-gen you need the Parent wording instead.
One final option would be to try the code without the word fields. I am not sure about the JSON for that, but using Automation you would not use that. So it would be:
{{issue.parent.Process.value}}
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.