"In Progress Issues" gadget option filters issues with logged work

Issue #702 resolved
Henning Tietgens created an issue

If a filter is defined for "In Progress Issues", the filter filters issues with logged work, too. This is not the expected behaviour.

Issues with logged work (in the displayed timeframe) should always be displayed. If "In Progress Issues" is defined and "Show empty rows" is yes for the gadget, all issues found by the filter should be displayed additionally.

We're using plugin version 2.9.3 and JIRA 6.4.12.

Comments (13)

  1. Andriy Zhdanov

    Hi Henning,

    I can't reproduce it. Could you please confirm the issue is displayed with no "In Progress Issues" used?

  2. Andriy Zhdanov

    Hi Henning,

    Could you please check in jira log if there is an error when you use this query?

    Thank you.

  3. Henning Tietgens reporter

    Hi Andriy,

    there are no errors or messages in the log while the gadget is displayed or the config is changed. Tell me, if I should change the loglevel for a package.

    Thanks, Henning

  4. Andriy Zhdanov

    Sorry, I still can't get it. I tried also within different user (assuming gadget is showing data for specified user, instead of logged in user), but all works as expected - issues with work logged are always shown, in current and previous weeks for me.

    Could you please for completeness ad gadget configuration screen shot?

    But I don't have any particular ideas, nor can suggest to enable logging.

  5. Henning Tietgens reporter

    Hi Andriy,

    I took a look into the source (TimeSheetResource)...

    I suspect timesheet.weekWorkLogShort contains the logged work for the gadget.

    If the search result results is not null (which is the case, even if the filter doesn't found any issue), you save timesheet.weekWorkLogShort to t and delete it. Now you go through the found issues and only copy weekTimeSpents for this issues. All issues not within the search result will be ignored.

    In my opinion you shouldn't delete timesheet.weekWorkLogShort and only add issues from results if you don't find the issue in timesheet.weekWorkLogShort.

    Map emptyWeekTimeSpents;
    if ((timesheet.showDetails) && (ownTimesheet)) {
        String inProgressQuery = this.configurationService.getInProgressQuery();
        if (inProgressQuery != null) {
            SearchService.ParseResult parseResult = this.searchService.parseQuery(timesheet.remoteUser, inProgressQuery);
            SearchResults results = this.searchService.search(timesheet.remoteUser, parseResult.getQuery(), PagerFilter.getUnlimitedFilter());
            if (results != null && results.getTotal() > 0) {
                emptyWeekTimeSpents = new Hashtable();
                for (Issue issue : results.getIssues()) {
                    if (timesheet.weekWorkLogShort.get(issue) == null)
                        timesheet.weekWorkLogShort.put(issue, emptyWeekTimeSpents);
                    }
                }
            }
        }
    }
    

    I hope this helps.

    Henning

  6. Henning Tietgens reporter

    Hi Andriy,

    thanks for fixing it. I can confirm it's working now like expected.

    Thanks, Henning

  7. Log in to comment