bulkSetIssueProperty method
- required String propertyKey,
- required BulkIssuePropertyUpdateRequest body,
Sets a property value on multiple issues.
The value set can be a constant or determined by a Jira expression. Expressions must be computable with constant complexity when applied to a set of issues. Expressions must also comply with the restrictions that apply to all Jira expressions.
The issues to be updated can be specified by a filter.
The filter identifies issues eligible for update using these criteria:
-
entityIds
Only issues from this list are eligible. -
currentValue
Only issues with the property set to this value are eligible. -
hasProperty
:- If true, only issues with the property are eligible.
- If false, only issues without the property are eligible.
If more than one criteria is specified, they are joined with the logical AND: only issues that satisfy all criteria are eligible.
If an invalid combination of criteria is provided, an error is returned.
For example, specifying a currentValue
and hasProperty
as false
would not match any issues (because without the property the property
cannot have a value).
The filter is optional. Without the filter all the issues visible to the user and where the user has the EDIT_ISSUES permission for the issue are considered eligible.
This operation is:
- transactional, either all eligible issues are updated or, when errors occur, none are updated.
- asynchronous. Follow the
location
link in the response to determine the status of the task and use Get task to obtain subsequent updates.
Permissions required:
- Browse projects project permission for each project containing issues.
- If issue-level security is configured, issue-level security permission to view the issue.
- Edit issues project permission for each issue.
Implementation
Future<void> bulkSetIssueProperty(
{required String propertyKey,
required BulkIssuePropertyUpdateRequest body}) async {
await _client.send(
'put',
'rest/api/3/issue/properties/{propertyKey}',
pathParameters: {
'propertyKey': propertyKey,
},
body: body.toJson(),
);
}