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

Sharing the filter resets the group selection if other than group radio button was selected

    XMLWordPrintable

Details

    • 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.

    Description

      There is a dependency of the group select box on the radio button. The value of the group select box should be only taken into an account if the radio button for the group is selected. This is currently done in ShareFilter.doExecute() method

      if (options[0].equals(getOption()))
          getSearchRequest().setUser(getSearchRequest().getAuthor().getName());
      else
          getSearchRequest().setUser(null);
      if (!options[2].equals(getOption()))
          setGroup(null);
      getSearchRequest().setGroup(getGroup());
      

      Notice that setGroup on searchRequest is always called. The getGroup() method returns the group which may be nullified on the previous line via setGroup(null). The code is a bit misleading. It need better formatting (use braces around if-else bodies).

      The second problem may not be obvious and is debatable. Either explain why is setGroup(null) called - to clear the value if other than 'group' radio button is selected or do not set the group on ShareFilter, rather make setting the group on the search request conditional. For the later verify that if somebody called getGroup(), their behaviour will not be affected by this change.

      Attachments

        Activity

          People

            Unassigned Unassigned
            dushan@atlassian.com Dushan Hanuska [Atlassian]
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: