Remove total comment count in webhook payloads to limit expensive permission checks

XMLWordPrintable

    • Type: Suggestion
    • Resolution: Unresolved
    • None
    • Component/s: Webhooks
    • None
    • 8
    • 5

      Currently, when Jira serializes issue payloads for webhooks, it calculates the total number of comments visible to the user by iterating over all comments and performing a permission check on each one. This approach ensures the count is permission-aware, but it results in significant performance degradation for issues with many comments, especially in environments with complex permission schemes (such as nested groups or large user directories).

      In many cases, webhook consumers do not require the total comment count, and the cost of calculating it can outweigh its utility. The current implementation can lead to slow webhook payload generation, increased database load, and potential timeouts in large Jira Data Center instances.

      The suggestion is about removing total comment count from the JSON payload, and replacing it e.g. with a simple hasNext boolean property

            Assignee:
            Unassigned
            Reporter:
            Daniel Rauf
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: