Defect #26471

Issue Query: inconsistency between spent_hours sum and sum of shown spent_hours values

Added by Jens Krämer 2 months ago. Updated 2 months ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:Jean-Philippe Lang% Done:

0%

Category:Issues list
Target version:3.4.3
Resolution:Fixed Affected version:3.4.2

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

Associated revisions

Revision 16839
Added by Jean-Philippe Lang 2 months ago

Fix that spent_time total on the issue list can be wrong (#26471).

History

#1 Updated by Jean-Philippe Lang 2 months 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.

#2 Updated by Jean-Philippe Lang 2 months 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.

#3 Updated by Jens Krämer 2 months 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.

#4 Updated by Jean-Philippe Lang 2 months ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF