sanitiseJqlQueries method

Future<SanitizedJqlQueries> sanitiseJqlQueries({
  1. required JqlQueriesToSanitize body,
})

Sanitizes one or more JQL queries by converting readable details into IDs where a user doesn't have permission to view the entity.

For example, if the query contains the clause project = 'Secret project', and a user does not have browse permission for the project "Secret project", the sanitized query replaces the clause with project = 12345" (where 12345 is the ID of the project). If a user has the required permission, the clause is not sanitized. If the account ID is null, sanitizing is performed for an anonymous user.

Note that sanitization doesn't make the queries GDPR-compliant, because it doesn't remove user identifiers (username or user key). If you need to make queries GDPR-compliant, use Convert user identifiers to account IDs in JQL queries.

Before sanitization each JQL query is parsed. The queries are returned in the same order that they were passed.

Permissions required: Administer Jira global permission.

Implementation

Future<SanitizedJqlQueries> sanitiseJqlQueries(
    {required JqlQueriesToSanitize body}) async {
  return SanitizedJqlQueries.fromJson(await _client.send(
    'post',
    'rest/api/3/jql/sanitize',
    body: body.toJson(),
  ));
}