Non-Required Field treated as Required.

Stephen Basham November 18, 2013

When calling our JIRA createmeta service, we are noticing that certain fields are not marked as required in the json, yet when attempting to create an issue, the field is treated as required. Is this a known issue? If so, is there a workaround available?

5 answers

1 accepted

1 vote
Answer accepted
Erik Saline [BlackPearl PDM]
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.
November 18, 2013

Did you try the Where is My Field feature, https://blogs.atlassian.com/2013/04/jira-admins-where-is-your-field/? I know the field does display but there may be a scheme that is not 100% correct and Where is My Field might show you the problem.

Stephen Basham November 20, 2013

As it turns out, the issue was indeed the schema. Ultimately we had to file a ticket to our JIRA admin and they responded with the below statement.

"Currently, your project is using [a specific] Schema that has some Business Rules associated with them.

The business conditions will come across and performs the validations while creating/editing issues.

One of the business rule condition is "While creating issue type "Affect version is required".

That's the reason you are getting this validation message when Affect Version field is empty.

Note:

Making this field as "Required" will be applied to all issue types, but other issue types may or may not require this field."

Thank you all for your speedy comments!

0 votes
Erik Saline [BlackPearl PDM]
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.
November 18, 2013

John B could be right as well, it could be a validator in the workflow. Check out validators in this article, https://confluence.atlassian.com/display/AOD/Advanced+workflow+configuration

0 votes
Erik Saline [BlackPearl PDM]
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.
November 18, 2013

Looking at the other fields there is an astreik next to the field name, is there an astreik next to Affects Versions. It is hard for me to verify in your screenshot. Did you try to create the issue without an Affects Version? Maybe "Version is required." is just in the field description, because that is not the typical JIRA field required indicator.

0 votes
John Bishop
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.
November 18, 2013

Perhaps there is something in the workflow transition which is requiring a value in those fields.

0 votes
Joe Pitt
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 18, 2013

Which fields? By default the summary field is required to create an issue. I don't know if you can get around that. also, resolution is required if it appears on the screen and as such should only be displayed on the transition screen on the transitions where it should be set.

Stephen Basham November 18, 2013

Specifically the versions field, also called Affects Version/s , in the rest json response the field is not marked as required, but when attempting to create an issue, it states that the field is required.

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 18, 2013

What happens when you create the issue in the web UI? Is the field shown as mandatory with the little red star?

Stephen Basham November 18, 2013

No, the field is not shown as mandatory.

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 18, 2013

Ok, in that case, the field is not mandatory, so the JSON won't contain anything to say that it is.

But, the error you are seeing is down to a validator, which is a function of the workflow, and there's no way the JSON can know that you have configured it that way.

It's an unusual thing to do - use a validator on create to make things mandatory, and probably unnecessary. If you do it in standard field config instead, it'll create the correct JSON as well as make it mandatory on screen.

Suggest an answer

Log in or Sign up to answer