Jira Expressions API hits "expensive operations" limit (10) for comments — forcing fallback to REST Search API

Hi everyone,

We’re building a Forge app that adds custom JQL functions to Jira Cloud. Our architecture was designed to use the Jira Expressions API (POST /rest/api/3/expression/evaluate) as the primary data retrieval method, since it runs server-side and supports up to 100,000 issues — far more efficient than paginating through GET /rest/api/3/search/jql.

However, we hit a hard blocker when evaluating expressions that access comments on issues.

The error:

Expression evaluation failed (400): {
“errorMessages”: [
“Evaluation failed: "i.comments" - Expression executed too many expensive operations (limit: 10)”
],
“errors”: {}
}

The expression was something like:
issues.map(i => i.id)
…with comments included in the context or accessed on each issue. Apparently accessing i.comments counts as an expensive operation, and the limit is 10 per expression evaluation — meaning this fails as soon as more than 10 issues have their comments accessed.

So my questions are:

  • What exactly counts as an “expensive operation” in Jira Expressions? Is there an official list of which fields/properties are expensive?

  • For fields like comments, attachments, worklogs — is the REST Search API (/rest/api/3/search/jql) the only supported path for bulk retrieval in a Forge context?

We have a related performance concern with /rest/api/3/search/jql — it uses nextPageToken-based pagination (unlike the old /rest/api/3/search which supported startAt-based parallel requests). With ~300 issues it already takes several seconds to
complete sequentially. If the Expressions API can’t be used for these fields, we’d love to know if there’s any recommended approach for efficient bulk retrieval of date fields. Thank you

Hey @JelsinStibenSanchezA, expensive operations are documented here: https://developer.atlassian.com/cloud/jira/platform/jira-expressions/#expensive-operations

For fields like comments, attachments, worklogs — is the REST Search API (/rest/api/3/search/jql) the only supported path for bulk retrieval in a Forge context?

There are a few gotchas regarding the number of comments that gets returned using the search API. I recommend reading this changelog for more info: https://developer.atlassian.com/cloud/jira/platform/changelog/#CHANGE-2046

For comments, the only way to get more than 20 is by using the get comments endpoint: https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-comments/#api-rest-api-3-issue-issueidorkey-comment-get