Feature #20221

Time entry query : column week

Added by Jérôme BATAILLE about 3 years ago. Updated over 2 years ago.

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

0%

Category:Time tracking
Target version:3.2.0
Resolution:Fixed

RM_20221_time_entry_query_column_week.diff Magnifier (910 Bytes) Jérôme BATAILLE, 2015-07-01 18:43

RM_20221_Time_entry_query_column_week_Tests.diff Magnifier (963 Bytes) Jérôme BATAILLE, 2015-08-14 00:33


Related issues

Related to Redmine - Defect #26780: Translation for label_week in time report is not working Closed

Associated revisions

Revision 14723
Added by Jean-Philippe Lang over 2 years ago

Adds week column to time entries list (#20221).

History

#1 Updated by Jérôme BATAILLE about 3 years ago

Here is the patch working on any version of Redmine.

Please feel free to integrate this straightforward patch

#3 Updated by Jérôme BATAILLE almost 3 years ago

Here is a patch, only the unit test, there is no controller test about queries available columns

#4 Updated by Toshi MARUYAMA almost 3 years ago

  • Target version set to 3.2.0

#5 Updated by Jean-Philippe Lang almost 3 years ago

Does it make sense to display the week number without the year? Sorting on this column will result in time entries from different years appear with the same week.

#6 Updated by Jérôme BATAILLE almost 3 years ago

Jean-Philippe Lang wrote:

Does it make sense to display the week number without the year? Sorting on this column will result in time entries from different years appear with the same week.

I don't see a use case that makes this sort useful, but on the other hand displaying this column is useful to have the week number without duplicating informations in other columns (spent_on). The yyyy-ww sort can be done with spent_on.

Thank to have added this patch to 3.2.0

If you have some time to review my other pending patches I will be very pleased !

#7 Updated by Jean-Philippe Lang almost 3 years ago

Jérôme BATAILLE wrote:

I don't see a use case that makes this sort useful

Just asking... because the patch makes it sortable.

#8 Updated by Jérôme BATAILLE almost 3 years ago

Jean-Philippe Lang wrote:

Just asking... because the patch makes it sortable.

We are at the frontier of YAGNI :-) I can't see a use case, but perhaps some folks will, and adding the sort costs nothing.

#9 Updated by Jean-Philippe Lang over 2 years ago

  • Status changed from New to Closed
  • Assignee set to Jean-Philippe Lang
  • Resolution set to Fixed

Column added in r14723. But sort is done on spent_on, as sorting by week number does make no sense when we have time entries on several years.

#10 Updated by Jérôme BATAILLE over 2 years ago

Thanks a lot !

#11 Updated by Toshi MARUYAMA 11 months ago

  • Related to Defect #26780: Translation for label_week in time report is not working added

Also available in: Atom PDF