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

SearchRequestService#updateFilter in Jira's Java API doesn't update cache as it should resulting in broken filter links when updating filter owners until Jira is restarted

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • High
    • None
    • 7.0.11, 7.1.10, 7.2.10, 7.3.8, 7.4.4
    • Java API

    Description

      Summary

      From https://productsupport.adaptavist.com/browse/SRJIRA-2393:

      The problem is, even after changing the filter's ownership, the filter will continue to show up in the original owner's list of filters. The new owner can see it and use it normally, but the old owner gets a broken link in their "Manage Filters" screen. If the filter was a favorite, it will be in their list of favorites in the "Issues" drop-down, and it will be broken there too.

      It appears calling the following Java API doesn't update filter caches as expected:
      https://docs.atlassian.com/jira/7.1.2/com/atlassian/jira/bc/filter/DefaultSearchRequestService.html#updateFilter-com.atlassian.jira.bc.JiraServiceContext-com.atlassian.jira.issue.search.SearchRequest-

      Steps to reproduce

      • Use SearchRequestService#updateFilter as described above in the Java API to change the owner of a search filter
      • Login as the previous filter owner.
        • The filter will continue to be visible under "Manage Filters" however the link is broken
        • If this filter was a favorite as well it will appear under Favorites however the link is broken

      Expected behavior

      After using SearchRequestService#updateFilter the previous owner no longer sees the filter under "Manage Filters". If the filter is marked as a favorite it should still be visible which is good however the link should work and not be broken

      Workaround

      • Restart Jira

      ScriptRunner built-in script Change dashboard or filter ownership uses ClearCacheEvent as a workaround.
      Note that clearing caches may cause performance problems in large data center environments and may result in a cluster outage.

      Attachments

        Activity

          People

            Unassigned Unassigned
            jcurry Jeff Curry
            Votes:
            31 Vote for this issue
            Watchers:
            20 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: