Defect #26471
closedIssue Query: inconsistency between spent_hours sum and sum of shown spent_hours values
0%
Description
Steps to reproduce:
- Create two projects A and B, enable the spent time module only in A.
- Create issues in A and log time for them.
- Move one of these issues to B.
- go to /issues, configure filters so all issues created in step two are shown, add the Spent time column and also tick the Spent time checkbox in the Totals row.
Result:
The Spent time sum shown above the table is the sum of the time logged in step two, though the issue moved to B shows 0 in the Spent Time column. (because the module is disabled in Project B and thus it's time entries aren't visible
anymore).
Expected Result:
The total should be the sum of the values shown for each issue in the corresponding column.
Easiest way to fix it would certainly be to fix the totals computation so it only includes hours from visible time entries. In addition to the module enabled / disabled situation described above, it might also be that, with an enabled spent time module in B, but given I do not have permission to see time entries in B, the moved issues' time entries are still counted. This issue would be fixed with above solution as well I think.
The sum should (preferably only if we know it isn't complete) be amended with a hint (footnote or something else) informing the user that this sum is (or possibly is) not the complete sum due to permissions / modules not being enabled).
Updated by Jean-Philippe Lang about 7 years ago
- Status changed from New to Resolved
- Assignee set to Jean-Philippe Lang
- Target version set to 3.4.3
- Resolution set to Fixed
This should be fixed in r16839. It also fixes the behaviour of sorting issues by spent_hours.
Updated by Jean-Philippe Lang about 7 years ago
The sum should (preferably only if we know it isn't complete) be amended with a hint (footnote or something else) informing the user that this sum is (or possibly is) not the complete sum due to permissions / modules not being enabled).
This is not part of the fix. There are many place where this hint could be added if it's needed. We should track it in a separate feature request.
Updated by Jens Krämer about 7 years ago
Thanks for the quick fix!
Jean-Philippe Lang wrote:
The sum should (preferably only if we know it isn't complete) be amended with a hint (footnote or something else) informing the user that this sum is (or possibly is) not the complete sum due to permissions / modules not being enabled).
This is not part of the fix. There are many place where this hint could be added if it's needed. We should track it in a separate feature request.
I created #26491 for this.
Updated by Jean-Philippe Lang about 7 years ago
- Status changed from Resolved to Closed