I use the REST API to create Jira tickets.
Previously it worked well (I did create the issue including this custom field with REST API successfully), but the error
Field 'customfield_10399' cannot be set. It is not on the appropriate screen, or unknown.
suddenly happens recently, don't really know why.
I did check:
- When I create the Jira ticket manually, the field is there on the issue layout.
- When I call the rest API to GET the issues' info, the custom field (customfield_10399) is returned in the JSON result.
- When I use the rest API to GET all the fields of the workspace, the custom field customfield_10399 is also returned in the custom fields list. (the URL is https:/MY_WORKSPACE/rest/api/2/field/)
I'm thinking the configuration of the project might be the cause but cannot find the info anywhere else. Thank you for your support.
Hi @Tu Pham ,
What is the field type of customfield_10399? What is the value that you are trying to set to the field?
Hi @Niranjan
The field type is string, I tried to post something like this
'fields':{
'project': {'key': project_key},
'summary': summary,
'description': description,
'issuetype': {'name': issuetype_name},
'priority': {'id': priority_id},
'customfield_10399': 'this_is_a_string'
}
(without the customfield_10399, the request is successful.)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Tu Pham ,
Can you try with this?
"fields" : {
"project": {"key": project_key},
"summary": summary,
"description": description,
"issuetype": {"name": issuetype_name},
"priority": {"id": priority_id},
"customfield_10399" :
{"value" : "this_is_a_string"}
}
If the above doesn't work, just try with this "customfield_10399": "this_is_a_string"
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.