-
Type:
Suggestion
-
Resolution: Unresolved
-
1
Issue Summary
When performing a request for the Get custom field context using the fieldId parameter with a custom field that contains scope, the REST API response returns an error that the custom field was not found.
Steps to Reproduce
- Access a Team managed project, and go to the project settings.
- Go to the issue type, and create a custom field (which will have the scope of the project).
- Find the custom field with the following endpoint: Get fields.
- Search for the custom field context using the fieldId with the ID of the custom field that was created and has the scope: Get custom field context.
Expected Results
The context result.
Actual Results
The below response is returned:
{
"errorMessages": [
"The custom field was not found."
],
"errors": {}
}
Workaround
Currently contexts for Team managed project are not exposed to users.
But if you are after the option values for a field it can be retrieved using the issue create meta endpoints, referring to the field's allowedValues:
- a singular project and issue type https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issues/#api-rest-api-3-issue-createmeta-projectidorkey-issuetypes-issuetypeid-get
- a project and all its issue types https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issues/#api-rest-api-3-issue-createmeta-projectidorkey-issuetypes-get
Example:
{
"required": false,
"schema": {
"type": "option",
"custom": "com.atlassian.jira.plugin.system.customfieldtypes:select",
"customId": 10074
},
"name": "option",
"key": "customfield_10074",
"hasDefaultValue": false,
"operations": [
"set"
],
"allowedValues": [
{
"self": "<site>/rest/api/3/customFieldOption/10042",
"value": "Option 1",
"id": "10042"
}
],
"fieldId": "customfield_10074"
}
- relates to
-
JRACLOUD-80743 /context/mapping REST endpoint does not work on Team Managed Project
- Closed
-
JRACLOUD-81481 Support for creating App project-scoped custom field types in team-managed projects
- Closed