getEditIssueMeta method
Returns the edit screen fields for an issue that are visible to and editable by the user. Use the information to populate the requests in Edit issue.
This endpoint will check for these conditions:
- Field is available on a field screen - through screen, screen scheme,
issue type screen scheme, and issue type scheme configuration.
overrideScreenSecurity=true
skips this condition. - Field is visible in the
field configuration.
overrideScreenSecurity=true
skips this condition. - Field is shown on the issue: each field has different conditions here. For example: Attachment field only shows if attachments are enabled. Assignee only shows if user has permissions to assign the issue.
- If a field is custom then it must have valid custom field context, applicable for its project and issue type. All system fields are assumed to have context in all projects and all issue types.
- Issue has a project, issue type, and status defined.
- Issue is assigned to a valid workflow, and the current status has
assigned a workflow step.
overrideEditableFlag=true
skips this condition. - The current workflow step is editable. This is true by default, but
can be disabled by setting
the
jira.issue.editable
property tofalse
.overrideEditableFlag=true
skips this condition. - User has Edit issues permission.
- Workflow permissions allow editing a field. This is true by default
but
can be modified
using
jira.permission.*
workflow properties.
Fields hidden using Issue layout settings page remain editable.
Connect apps having an app user with Administer Jira global permission, and Forge apps acting on behalf of users with Administer Jira global permission, can return additional details using:
overrideScreenSecurity
When this flag istrue
, then this endpoint skips checking if fields are available through screens, and field configuration (conditions 1. and 2. from the list above).overrideEditableFlag
When this flag istrue
, then this endpoint skips checking if workflow is present and if the current step is editable (conditions 6. and 7. from the list above).
This operation can be accessed anonymously.
Permissions required:
- Browse projects project permission for the project that the issue is in.
- If issue-level security is configured, issue-level security permission to view the issue.
Note: For any fields to be editable the user must have the Edit issues project permission for the issue.
Implementation
Future<IssueUpdateMetadata> getEditIssueMeta(
{required String issueIdOrKey,
bool? overrideScreenSecurity,
bool? overrideEditableFlag}) async {
return IssueUpdateMetadata.fromJson(await _client.send(
'get',
'rest/api/3/issue/{issueIdOrKey}/editmeta',
pathParameters: {
'issueIdOrKey': issueIdOrKey,
},
queryParameters: {
if (overrideScreenSecurity != null)
'overrideScreenSecurity': '$overrideScreenSecurity',
if (overrideEditableFlag != null)
'overrideEditableFlag': '$overrideEditableFlag',
},
));
}