Inconveniently, the error doesn't appear until I click the exclamation point in the rule summary, or edit the rule, after publishing the rule. The JSON is:
{
"fields": {
"Business Analyst Signoff": { "id": "{{initiator.accountId}}" }
}
}
The error is:
Additional fields contains invalid field(s) in 'update' or 'fields' section: Business Analyst Signoff
Hi @Phil Bustin
Smart values are case and spacing-sensitive, so did you confirm you have the correct name for that field? You can check that using an example issue with the field and this how-to: https://support.atlassian.com/cloud-automation/docs/find-the-smart-value-for-a-field/
You could also try using the custom field ID name for the field.
Next...you do not show your entire rule for context, so I wonder if the {{issue}} at that location in the rule it has that field? For example, if you are inside of a branch perhaps it could be referencing a different issue type.
Kind regards,
Bill
I'm sure the field name is correct.
So far, I don't understand what to do with the information provided when I click the link.
I don't know how to use the custom field ID name.
The field appears in the issue.
Here is the entire rule:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'll try to clarify...
Using your Jira URL in a browser and an example issue, you can find all of the supported fields/smart values for your issue. For example:
myJiraCloudUrl/rest/api/2/issue/myIssueKey?expand=names
Search in the results on the page for your field name to confirm the spelling, capitalization, and spacing of the smart value's name.
If that looks the same as what you already tried, you can also find the custom field ID on the page and use that in the JSON, as described here.
{
"fields": {
"customfield_12345": { "id": "{{initiator.accountId}}" }
}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The rule was accepted using customfield (why not field name?), but the rule execution log showed:
Action details:
Edit issue
Error editing issues
ASTWFR-8 (data was not an array (customfield_10062))
Again, Business Analyst Signoff is a User Picker (single user) field. Is { "id": "{{initiator.accountId}}" } the name of the user who selected the transition?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Would you please post an image of the edit action for your rule, as that may provide some context? That error does not appear to be related with the user picker, single user field you describe. Thanks!
Regarding "why not field name", I suspect that the field name you entered in the JSON does not exactly match what the smart value is...which can be confirmed with the instructions I provided. In some cases, the custom field ID must still be used, such as field names containing special or non-displayable characters.
Regarding your field type, user picker (single user), those are set with automation by either setting the "id" to the user's "accountId" or by setting the field directly, such as with just {{initiator}} (as the default is to use the accountId). The user's displayName is not used to set user fields.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The automation worked. Thank you!
1) Apologies: I had copied the field ID from the next field, not the one I wanted; I hadn't realized that the colon and comma meant the ID came first, then the field name. The automation you see below worked with that correction.
2) If by "smart value", if you mean the field name that appears after the ID, the name sure looks the same as the one I first tried in the rule, but when I coped it from the report (can I call it a report?) and pasted it into the JSON, it worked. I'll try to figure that one out.
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.