I have a custom field in Jira for "Community/Entity" that prompts me to select a community, then prompts me to select an entity #, then merges the two dropdown selections into one field with the Custom Field ID # (10031). I am trying to write an automation where if the parent has the "Community/Entity" field filled out, automation will fill the "Community/Entity" out for the child issues.
I have created a variable name: customval
Smart Value: {{issue.parent.customfield_10031.value}}
Here is the "edit issue" value I am using:
{"fields": { "customfield_10031": {"value": "{{customval}}"} } }
My branch is For JQL parent = {{issue.key}}
Then Edit the issue additional field:
{ "fields": { "customfield_10031": {"value": "{{customval}}"} } }
-------------------------------
When this automation runs it returns successful, but only the community updates and not the entity#.
Thank you in advance for your help!
MG
Hi @Ganea_ Merissa -- Welcome to the Atlassian Community!
What is the type of your "Community / Entity" field? Is it a selection list, cascading field?
If so, the "parent" and "child" values must be selected separately:
the parent is {{issue.customfield_10031.value}}
the child is {{issue.customfield_10031.child.value}}
And, what is the type into which you are trying to store the values? If they are the same, you could try copying the value from the parent issue using the ... option at the right of the field (in the Edit Issue action), or using JSON:
Kind regards,
Bill
Hi Bill. "Community/Entity" is a selection list, cascading field. That would not change for the child issue, as it is still the same field I am trying to update.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for confirming that.
Have you first tried using the Edit Issue action to copy from the parent? If that does not work, please try the advanced edit with JSON I described above.
And if that does not help...
Please post an image of your complete rule, of the edit issue action, and of the audit log details showing the rule execution. Those will help provide context for your question.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Ganea_ Merissa
Welcome to the Atlassian community.
What type of project are you using? Get that information from the Type column on the View All Projects page under the Projects menu.
What type of field is "Community/Entity"?
What type of field is custom field 10031?
Can you provide a screen image for an issue where both these fields are populated, showing those two fields? (I don't think we need to see any of the other data in the issue at this time.)
Why are you merging and copying the data from the first to the second?
Please provide a screen image of your entire automation rule and all the details from the audit log entry from when the rule ran. Make sure that in the audit log entry you click all the ">" characters on the right to expand all the details of the entry.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What type of project are you using? Company-managed software
What type of field is "Community/Entity"? "Community/Entity" is a selection list, cascading field
What type of field is custom field 10031? a selection list, cascading field (Note: Community/Entity is the same as the custom field 10031)
Can you provide a screen image for an issue where both these fields are populated, showing those two fields?
Why are you merging and copying the data from the first to the second? People are filling out the Community/Entity for the parent, but not doing it for the child issues, and it needs to be done for reporting and analytic purposes. We are trying to avoid making this field mandatory by just copying from the parent if the stories are left blank. Each community has an associated entity number. The business just chooses to use a custom field to view this as one field vs two.
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.
Thank you for that additional information.
So you are trying to copy data from field "Community/Entity" in the parent issue to the exact same field in the child issue. The field is a Select List (cascading), and its ID is 10031.
The bit about merging and copying the data to a field confused me.
I agree with @Bill Sheboy 's suggestion that you try using the COPY option rather than the JSON editing option.
In the Edit Issue action, after selecting the "Community/Entity" field, click on the three dots to the right of the field and select copy
That will insert some text as shown below. Click directly on that text.
That will open a pop-up allowing you to select the source issue and the source field from which to copy the data. You should be able to change the Issue to copy value from selection to Parent. (Ignore my red arrow below. I copied this from another post I made about changing the source field in this copy operation.)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The problem I am having is "Community/Entity" is not an option I can choose in the "Choose fields to set" dropdown, so I have to use more options, additional fields and code to "find" it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Gotcha!
I believe the answer is provided by @Mark Segall in an answer he put on this post:
{
"update": {
"customfield_10031": [
{
"set": {
"value": "{{issue.parent.fields.customfield_10031.value}}",
"child": {
"value": "{{issue.parent.fields.customfield_10031.child.value}}"
}
}
}
]
}
}
I tested this in my own environment, with an appropriate id for a Select List (cascading) field, where the child issue was the trigger issue of the rule. It worked.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you for spelling out the code I need to use...This worked!!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Great!
If your requirement has been addressed with the help of our response, please consider clicking on the Accept Answer buttons above our response threads to mark your Question as Solved.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Atlassian Government Cloud has achieved FedRAMP Authorization at the Moderate level! Join our webinar to learn how you can accelerate mission success and move work forward faster in cloud, all while ensuring your critical data is secure.
Register NowOnline 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.