Hi all,
I'm trying to set up an automation rule with the following logic:
But then somehow Jira Automation is not able to find that custom field in JPD, see:
Is there any solution to this error? Thanks!
Got a reply back from support: apparently there is an issue with the configuration of our Automation bot on our Atlassian site. Don't know if the issue is only applicable to our instance or if it is an Atlassian issue in general. Their engineering team is working on a fix.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Rohan Parakh - yes I was able to get this fixed with the help of Atlassian support.
The automation would run under my account, but not under the Automation for Jira account. At the time, I reached out to support and it looks like that only they can fix it, so not unfortunately yourself:
That being said, we identified a small issue with the permissions granted to the Automation bot on your site and are already working on a fix. As soon as I get an update from the engineering team I'll let you know!
So if you have the permissions to do so, reach out to Atlassian JPD support and link this Community thread, or ask your (technical) Atlassian site admin to do so for you. They usually don't undertake any action based on issues on the Community pages.
Hope they can help you!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Are you using the customfield_12345 configuration for calling out the field? Or are you using the name? I find the custom field is far more likely to work than the name.
1 . Find the custom field name of your issue by using the Jira API to inspect your JSON.
https://yourdomain.atlassian.net/rest/api/2/issue/AAA-111?expand=names
Replace "yourdomain" in the above with your jira workspace.
Replace "AAA-111" with an issue that has Coral Component selected.
2. Next search the JSON for "Coral Component".
This is easier if you use an online JSON IDE - I used JSON Editor Online. It will format your JSON so it is easier to read, and give you a search tool to find the info easier.
If you use it, copy and paste all the JSON that was returned from your REST API query above.
Once you find the line that says
"customfield_12345": "Coral Component",
you will know you found the right custom field.
Note: this does not address the rest of the automation, just may help find the field you are looking for.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for your elaborate reply.
I have found the customfield_id for this field, but how can I now use this field to update/set the new value in the automation rule?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You would then go into > More Options and edit the JSON. Here is some info on how to do that:
https://support.atlassian.com/cloud-automation/docs/advanced-field-editing-using-json/
Hope that helps!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Marina Rambo - CC: @Bill Sheboy
I updated the rule with the following JSON (note that XYZ and cf_123 are of course updated in my actual script):
{
"update": {
"customfield_123": [{
"set": "XYZ"
}]
}
}
But unfortunately I still receive errors upon running:
Do I need a system-value for "set" as well, rather than the text-value "XYZ"? If so, how to find that one?
Or if not, what could possibly fix this?
Thanks once more!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Mart, what is the type of your custom field: single-select, multiple-select, etc.? The type of field impacts which syntax to use for the JSON edit.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Bill Sheboy - It is a multi-select field.
Edit - also doesn't seem to work...:
{
"update": {
"customfield_123": [
{"set": {"value": "XYZ"}}
]
}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for that information.
For a multiple-select custom field, there are two syntaxes, depending on whether you want to replace all values or add additional ones. FYI there are typos in the documentation, so I amended the "add" version to make it more clear.
To replace all please try this one:
{
"fields" : {
"customfield_12345" : [
{ "value" : "option1" }, { "value" : "option2" }
]
}
}
To add additional values:
{
"update" : {
"customfield_12345" : [
{
"add" : { "value" : "option 3" }
}
]
}
}
Please use the one that matches your scenario and let us know what you observe. Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Bill Sheboy @Marina Rambo
Unfortunately still no success...
I'm afraid there is no other solution left other than using the web request in automation. Do you believe that would work?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Let's checks some things first, as if they do not check out then the field cannot be edited with a Send Web Request to the REST API functions either.
First, have you confirmed that your field is on the views for the issue type in the target project, CORD?
Who is the actor for your rule? The default is Automation for Jira, which has permissions to change lots of things. If the actor was changed it is possible they do not have the necessary permissions.
Finally, let's confirm the field can be edited by automation rules using this how-to article. Essentially you find an example issue in your CORD project that has this field set, call a REST API function using a browser tab, and search for your field on the page (e.g., with CTRL-F). If the field is not present, rules cannot edit it. https://support.atlassian.com/cloud-automation/docs/find-the-smart-value-for-a-field/
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
First, have you confirmed that your field is on the views for the issue type in the target project, CORD? -> Yes
Who is the actor for your rule? The default is Automation for Jira, which has permissions to change lots of things. If the actor was changed it is possible they do not have the necessary permissions. -> Automation for Jira, did not change the actor since creation. However, I think I found out that the issue lies there. When I change the actor role to my own account, the automation suddenly runs and executes as expected.
Finally, let's confirm the field can be edited by automation rules using this how-to article. Essentially you find an example issue in your CORD project that has this field set, call a REST API function using a browser tab, and search for your field on the page (e.g., with CTRL-F). If the field is not present, rules cannot edit it. -> Yes, field is present.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
At this point, I recommend working with your Jira site admin to submit a ticket to Atlassian Support, including a link to this thread. If you are on a paid Jira license, your admin can do that here:
https://support.atlassian.com/contact/#/
They may see something we are missing in the field or rule configuration. When you hear back from them, please share what you learn to benefit the community.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Mart Postma
Some of the errors automation rules show do not always indicate the actual, root cause of a problem. For what your audit log shows, I wonder...
Automation rules which read / edit issues in multiple projects need to be global or multi-project in scope. A rule which is defined in a single project cannot do so.
What is the scope of your rule: single project or global / multi-project?
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 @Bill Sheboy
The automation scope is set to Global.
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.