Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-79127

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

XMLWordPrintable

    • Icon: Suggestion Suggestion
    • Resolution: Unresolved
    • None
    • Webhooks
    • None
    • We collect Jira feedback from various sources, and we evaluate what we've collected when planning our product roadmap. To understand how this piece of feedback will be reviewed, see our Implementation of New Features Policy.

      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

              Unassigned Unassigned
              drauf Daniel Rauf
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: