Hi!
I have a board in which I have a custom field with a dropdown list and sublist. I´m trying to automate copying this field of the main issue into the subtask that is being created, but I don't seem to find the correct Json expression:
This is what I have right now:
{
"fields": {
"customfield_10463": { "value": "{{parentIssue.customfield_10463.value}}", "child": { "value" : "{{parentIssue.customfield_10463.child.value}}"} }
}
}
The trigger is when an issue is created and has a condition that is when the issue type is a subtask
Thank you!
Is your rule generating an error message in the audit log? If so, what is the error message?
Can you use Log actions to print to the rule audit log the values for the parent issue field to make sure you are getting the values you expect?
{{parentIssue.customfield_10463.value}}
{{parentIssue.customfield_10463.child.value}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Trudy Claspill ,
Is not getting any error message, it says Success, but with the log actions, both values come up empty. I double-checked the custom field ID and it is right, I have an automation that can copy this field, but only when the issue is transitioned, I copied the CF Id from there. I´m not sure why is coming up empty in this automation.
I tried with your log action Json with another custom field that is being copied in another automation and it comes up also empty on the audit log.
My trigger is when an issue type "Candidate" (subtask) is being created, then it compares the issue type to ensure is type "candidate" and then the action is the Json to copy the field from the parent issue into the new subtask, followed by the Log actions you recommended.
I´m not sure why the custom field on the parent issue always comes up empty, including other custom fields that I tried. I don´t think is the Json anymore, but the reason why is not bringing the values. Is there any way I can fix this?
Thank you Trudy!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Diego Sanchez Cambas
Teachable moment:
As a next debugging step I would try printing out {{parentIssue.key}} to make sure you are referencing a valid issue.
If you don't get the value you expect, then that would suggest that you are not referencing the parent issue correctly. At that point I would start looking at the documentation, which is exactly what I did.
From reviewing documentation on Smart Values I have discovered that you are referencing the parent issue incorrectly. Refer to
https://support.atlassian.com/cloud-automation/docs/jira-smart-values-issues/#--issue.parent--
Instead of parentIssue you need to be using issue.parent so that the automation know which issue's parent you are referencing.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I tried with the Issue.parent and that worked perfectly! thank you very much!!!
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.