An invalid startIndex parameter in the filter results gadget preferences can cause no issues being displayed in the gadget even though the search returns issues in the issue navigator

XMLWordPrintable

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Low
    • None
    • Affects Version/s: 8.5.15, 8.13.6, 9.12.5, 9.17.2
    • Component/s: Dashboard & Gadgets
    • None
    • 8.05
    • 4
    • Severity 3 - Minor
    • 1

      Issue Summary

      An invalid startIndex parameter in search filter gadget preferences can cause no issues being displayed in the gadget even though the search returns issues in the issue navigator

      Steps to Reproduce

      ( problem only occurs sometimes with the steps below, not 100 percent reliable )

      1. create 11 issues, with subject WidgetTest
      2. create a filter 'summary ~ WidgetTest AND status = "To Do"'
      3. create "filter results" gadget on this filter ( Note: now whenever we sort the table of issues in the widget, widget preferences are updated via a PUT call to '/rest/dashboards/1.0/<dashboard_id>/gadget/<gadget_id>/prefs' )
      4. go to page 2, this displays only 11th record. Click on any table column to change the sort order.
      5. now edit one of the issues to chance status, so that filter has 10 issues now because of the status term in the query
      6. refresh the dashboard and it's empty (because it's still trying to display "the second page" (i.e. startIndex 10)

      Expected Results

      Search results in the gadget match with search results in the issue navigator

      Actual Results

      Search results gadget incorrectly displays 0 issues, even though the underlying filter returns issues

      Workaround

      The following SQL can be used to identify affected search result gadgets:

      select G.* from portalpage P
      join portletconfiguration PC on P.id = PC.portalpage
      join gadgetuserpreference G on PC.id = G.portletconfiguration 
      where PC.gadget_xml = 'rest/gadgets/1.0/g/com.atlassian.jira.gadgets:filter-results-gadget/gadgets/filter-results-gadget.xml'
      and G.userprefkey = 'startIndex' and userprefvalue <> '0';
      

      And the following SQL will reset the startIndex parameter to 0 for all search results gadgets:

      update gadgetuserpreference
      set userprefvalue = '0'
      where portletconfiguration in (select id from portletconfiguration where gadget_xml = 'rest/gadgets/1.0/g/com.atlassian.jira.gadgets:filter-results-gadget/gadgets/filter-results-gadget.xml')
      and userprefkey = 'startIndex' and userprefvalue <> '0';
      

            Assignee:
            Unassigned
            Reporter:
            Jeff Curry
            Votes:
            5 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated: