Issue creation fails due to invalid custom field default value
Platform Notice: Cloud - This article applies to Atlassian products on the cloud platform.
Summary
Users are unable to create new Jira issues and are getting error messages similar to what is shown below:
Error 1:
Couldn't send request. This form contains a hidden field that does not have a valid default value configured
Error 2:
Change Managers. Pick another user as the selected user doesn't exist
Error 3:
Couldn't create the issue. We're having some trouble creating the issue. Refresh the page and try again.
Note:
- The error message could also refer to a different field, but it basically specifies that the selected user does not exist.
- All hidden fields have valid values configured in this case and that is not the issue.
Cause
This error message is shown because an invalid value has been configured or selected for some other field that belongs to the field configuration. The field could either be pointed out in the error message or the field could not be specified as well. In this case, it would be necessary to check the browser console logs to identify the problematic field.
Useful information on how to access console logs:
- How to access Developer Tools in Chrome
- How to check log messages in the Console in Chrome
- How to access and check console logs in Firefox
Also, it is important to note the following:
- The field specified is sometimes not even added to the request form, but is usually a part of the field configuration or
- The field specified is a custom field that has a global context and is applicable to all issue types but has an invalid default value setup
- If the field specified, is a field migrated from server to cloud, then sometimes, the context is not configured at all.
When you open the details of such a field, you will notice that for one of the contexts, the following message is shown:
Checking the console logs would point out the field that has the error as seen below:
{"errors":[\{"errorMessage":"This form contains a hidden field that does not have a valid default value configured"}
{"errorMessage":"User 'Former user' is not valid for this user picker.","field":"customfield_10663"}],"reasonKey":"validation.error","reasonCode":"400"}
OR
A validation failure occurred when a customer attempted to create a request with issue type 'Service Request'. The hidden field 'Change managers' is required and does not have a default value set.
OR
{
"errors": [
{
"errorMessage": "This form contains a hidden field that does not have a valid default value configured"
}
},
{
"errorMessage": "Specify a valid value for '<customfieldname>'. The allowed values are , -1",
"field": "customfield_XXXXX"
}
Solution
When the error message refers to a custom field ID, the following documentation can be used to find out which custom field is being specified
Once the custom field has been identified, navigate to the custom field's configuration by following the steps listed below:
Select Cog Icon > Issues.
Under FIELDS, click Custom fields.
Search for the custom field identified earlier, click the 3 dots > Contexts and default value. Alternatively, you can click a field's screens or contexts link and then click Contexts > Create, edit or delete contexts.
Now, the default value would show something similar to what is shown in the screenshot below:
Other possible values that could be seen for the Default Value include <User Name>, unknown
The <user name> could refer to a previous user who was recently removed/deactivated from the site.
To edit or remove this default value, the following steps need to be followed:
- From the screen above, select Edit Default Value.
Enter a valid value or remove the invalid value that is causing issues
- Save and exit
Now, the errors seen earlier should not be displayed and the user should be able to create new issues.
If it is a configuration issue related to context, follow the steps below to resolve the context error:
- Navigate to the custom field page of your site: https://<yoursitename>.atlassian.net/secure/admin/ViewCustomFields.jspa
- Search for the field and click the three dots beside it.
- Go to Context and default values.
- Delete any additional context that might have been set for the field and which is incomplete.
After the corrective steps listed above have been taken, the request can be submitted from the portal again and ticket should get created without issues.
Related Documentation:
You can configure a custom field and set/change default values following the documentation given below: