I have an automation rule that creates a new Jira issue. There is a required field that is a custom field of type select list (single). I have to use JSON to set the value in the automation rule.
Every time I run the rule, I get an error indicating the custom field is required. But, that is the custom field I am trying to set with the JSON. Is there something wrong with my JSON?
Here is the error:
{
"fields": {
"customfield_11228": { "value": "AST Advance Sustainment Technology" }
}
}
Please check your Create Issue action in the rule to see if you selected both the field from the dropdown list and tried to set it with JSON. That can cause that symptom as only one may be used at a time.
If that is not the cause, please post images of your complete automation rule, the Create Issue action, and of the audit log details showing the rule execution. Those may provide context to help explain this symptom.
Kind regards,
Bill
Hi @Bill Sheboy
Thanks for the reply. I confirmed that the custom field is not selected from the dropdown list. I don't see it as an option, which is why I am using JSON.
Here is the automation rule:
And, here is the error from the Audit Log
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Is that field on your create issue screen for that issue type?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I determined that the field is actually from a plugin, either Multi-Level Cascading Select or Dynamic Forms for Jira. It only goes to the second level (like a cascading select field) if you choose an option other than the one I am trying to set, which is why I didn't realize it was not a standard select list field.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ah, that helps clarify things!
Some addon / plugin fields are not supported by automation rules as they are dynamically generated. To check if your field can be set by a rule, please use this how-to article to find the apparently supported fields for automation: https://support.atlassian.com/cloud-automation/docs/find-the-smart-value-for-a-field/
The basic steps are:
yourJiraURL/rest/api/3/issue/yourExampleIssueKey?expand=names
If it was there and is a cascading field, here is the syntax to set the values using JSON:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Bill Sheboy thanks for the info. I can see the field in the page you referenced above. I have opened a support ticket with the Deviniti folks to see if they can provide some help.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ah...now search on the page for "customfield_11228" to see if it has a value further down the page. That will show the format to set it, when possible.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Bill Sheboy your help has been fantastic! Based on your last comment, I was able to identify the ID of the select value: 16483. I changed my JSON to use the ID and not the "value" and it worked.
For the record, here is the JSON:
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.