Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Filling fields with "Additional Fields" doesn't satisfy Required Fields

Rebekah Myers August 31, 2023

I am looking to change some of my company's automations so that they do not need to all be updated if we change the name of the field. This requires using the "Additional Fields" dropdown/input, as for some reason, Jira Automation seems to reference custom fields by their names and not IDs by default.

Note that this custom field is a "Select List [Multiple Choices]" field. Its name was recently changed to "Team", which overlaps with the Jira default already, and I have a feeling it may be renamed again in the near future. I'd like to be able to skip the "fix every single automation that touches this field" step in that renaming process in the future, if possible.

I have set up this JSON:

{
"fields": {
"customfield_10080": [{
"set": {"id": 10124}
}]
}
}

And it seems like it would work if not for that field being required. This is the error that it throws:

Error creating issue

    Team is required. (customfield_10080)

Now, as seen above, this field is obviously being filled. I have tried replacing "fields" with "update", but then it throws an error about needing to be in an array format. I have tried removing the "set":, but it throws an error about JSON formatting.

Is this simply not an option in the current state of Jira Cloud? Or am I just setting these fields incorrectly? Thanks for any future help on this.

 

EDIT:

Giving more information:

The Automation is a manual trigger intended to be used on an Epic. It has 5 "Create Issue" actions. Each one looks basically like this now: imageThis is how that automation looks without Additional fields, and works:

image

This is the automation log, with labels for when certain changes are made:

image

1 answer

1 accepted

2 votes
Answer accepted
Marc Koppelaar - Devoteam
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 31, 2023

Hi @Rebekah Myers 

Welcome to the community.

Can you share your automation rule details and audit log?

The error tells me that this is a required field on creating an issue, but the rule worked before as I understand before your request.

Can you share the working rule details as well

Rebekah Myers August 31, 2023

Thank you, @Marc Koppelaar - Devoteam !

I have added more information to the original post in the form of screenshots.

Marc Koppelaar - Devoteam
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 31, 2023

Hi @Rebekah Myers 

I think I found the solution, this worked on my end.

You need to set the value as a string.

replace <name of id 10112> with the name of the option

"customfield_10080" : [ { "value": "<name of id 10112>" } ]

Rebekah Myers August 31, 2023

Would this be stable/automatically update if I ever had to change the name of the option? Documentation says that I can use either the id or the field name. I am trying to keep it as stable to field changes as possible.

Marc Koppelaar - Devoteam
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 31, 2023

Hi @Rebekah Myers 

I got it working on option id as well, if you quote the option. If you don't put the id number in quotes, it will fail.

"customfield_10080" : [ { "id": "10112" } ]

Assuming 10112 is the id of the value you want to set.

Rebekah Myers August 31, 2023

Turns out the issue was both the quotes and using "set". It is interesting that the quotes must be around the ID, as the documentation does not reflect that. Thank you so much!

Marc Koppelaar - Devoteam
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 31, 2023

Glad to help.

Please accept my answer.

Like Rebekah Myers likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events