Surface explicit backend validation errors in UI banner when failing to save a filter due to invalid shares/groups

XMLWordPrintable

    • 1

      Summary

      When saving updates or modifications to an existing saved Jira filter that contains invalid or obsolete share permissions (e.g., a shared group that has been deleted or renamed in Jira/LDAP/Crowd, or for which the user lacks share permissions), the Jira UI displays a generic alert banner:

      "The filter <Filter_Name> could not be saved."

      While the backend correctly rejects the save operation as designed to maintain permission integrity, the specific validation failure message returned in the REST API response is not surfaced in the UI.

      —

      Steps to Reproduce

      1. Create a user group either directly in Jira Internal Directory or via an external directory (LDAP / Crowd / Active Directory) (e.g., test-share-group).
      2. As User A, create a search filter and share it with test-share-group under Details > Edit permissions. Save the filter.
      3. In Jira or the external directory (LDAP/Crowd), perform one of the following:
        • Delete or rename the group test-share-group (and run directory sync if using LDAP/Crowd).
        • Remove User A's permissions/membership such that they can no longer share with test-share-group.
      4. Log in as User A, open the saved filter via Issue Search, make a change to the search criteria (JQL), and click Save.

      —

      Expected Result

      The UI error banner should surface the specific validation reason returned by the backend REST API response (e.g., Group: 'test-share-group' does not exist, or you do not have permission to share it), guiding the user to edit the filter permissions.

      —

      Actual Result

      • The UI displays only a generic error banner:
          {quote}
          The filter <Filter Name> could not be saved.
          {quote}
      • Inspecting the browser developer tools network response for /rest/api/2/filter/<filterId> shows that the backend does provide the exact error:
        {
          "errorMessages": [],
          "errors": {
            "shares": "Group: 'test-share-group' does not exist, or you do not have permission to share it.",
            "shares_delegated": "Group: 'test-share-group' does not exist, or user '<User>' does not have permission to share with this group."
          }
        }
        

      —

      Suggested Solution / Improvement

      Enhance the frontend error handling on the Filter Save action to parse and display the specific errors.shares / errors payload strings from the backend response in the notification banner instead of falling back to a generic error message.

      —

      Workaround

      1. Open the affected filter in Issue Search.
      2. Click Details > Edit permissions.
      3. Remove or update the invalid group share in the Shares / Viewers list and click Save.
      4. You will now be able to update and save the filter JQL.

              Assignee:
              Michal Samujlo
              Reporter:
              Nikit Kohli
              Votes:
              4 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated: