Feature #8761

My page - Spent time section only display 7 days, make it a parameter

Added by Mario Morneau about 6 years ago. Updated 6 months ago.

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

0%

Category:My page
Target version:3.4.0
Resolution:Fixed

Description

Sorry for my english I am from Québec native language french

This feature would be easy to add.

In My Page if I personnalize my page by hadding the spent time option

only 7 days are shown.(sorry in french)

Temps passé (les 7 derniers jours)

Total: 22.21
Activité Projet Commentaire Heures

Here in my shop we do the time sheet every 2 weeks (14 days).

Could we had a parameter in the configuration section of redmine to select the number of days that could be shown in that report.

We could have general parameter in the administration configuration section
let said
Default days "time spent" report 7 day(s)

And event better could it be set by user in the my account section. (note the general one would suffice for us)
for exemple by adding a parameter

User default days "time spent" report (default) day(s)

Where (default) means to use the general one from the admin section

So in the code for the report if the user one is not default we use that one and if it is default we use the general one

here an exemple of my page (sorry in french)

Temps passé (les 7 derniers jours)

Total: 22.21
Activité Projet Commentaire Heures

so if i set my User default days "time spent" report to 14 (or the general one)
I would have see (in bold)

Temps passé (les 14 derniers jours)

Total: 22.21
Activité Projet Commentaire Heures
and list 14 days in the report

rm_this_week.png (60.2 KB) Pavel Potcheptsov, 2016-11-08 12:32

rm_8761_fixes_for_personalize_this_page_mode.patch Magnifier (546 Bytes) Marius BALTEANU, 2017-02-27 20:59


Related issues

Related to Redmine - Patch #2106: Ability to choose period in 'Spent time' and count of wat... New 2008-10-29
Related to Redmine - Feature #24346: My page - Spent time: add predefined parameter "This week" New
Related to Redmine - Feature #10713: My Page: Make the items on the page configurable New
Duplicated by Redmine - Feature #7508: modify the extent time of the "spent time" on "my page" Closed 2011-02-01

Associated revisions

Revision 15942
Added by Jean-Philippe Lang 10 months ago

My page - Spent time: configurable number of days to display (#8761).

Revision 15943
Added by Jean-Philippe Lang 10 months ago

Tests broken by r15942 (#8761).

Revision 16364
Added by Jean-Philippe Lang 6 months ago

Fix for "Personalize this page mode" (#8761).

Patch by Marius BALTEANU.

History

#1 Updated by Mario Morneau about 6 years ago

Hi! i found the following plug-in

Redmine Extended Spent Time plugin

does part of what i want but since it is week and dépending of the begening day of working week could have problem.

I would prefer to be able to show the number of days.

Could it be done and integrate to the main redmine project....

Thanks

#2 Updated by Etienne Massip about 6 years ago

  • Category set to Administration

#3 Updated by Stefan Grad over 5 years ago

This feature would be very useful for us, too.

#4 Updated by htellez htellez over 4 years ago

All the people at my office (20 guys) would love a feature like this.

Despite we update our time entries daily, sometimes we need to review how much time a task took.

In the summary pages for time entries it is difficult to know how much time we spent in a specific day.
You need to sum up the time logged. In the "my page" it is beautiful, it only shows your time entries
and it sums up how much time you spent in each day.

It has been a whole year since the last update to this post. What have happened?

#5 Updated by Filou Centrinov over 4 years ago

Category: My Page

#6 Updated by Toshi MARUYAMA over 4 years ago

  • Category changed from Administration to My page

#7 Updated by Keven Marin about 4 years ago

I'm currently working a plugin that could send a weekly email report to help our employees to manager and clock their time.
In My Page, it could be nice to have such a feature that tell your activities for the last X days/month.

#8 Updated by Jean-Philippe Lang 10 months ago

  • Subject changed from My page - Spent time section only display 7 days make it a parameter to My page - Spent time section only display 7 days, make it a parameter
  • Status changed from New to Closed
  • Assignee set to Jean-Philippe Lang
  • Target version set to 3.4.0
  • Resolution set to Fixed

Each user can now change the number of days that are displayed on "My Page".

#9 Updated by Jean-Philippe Lang 10 months ago

  • Related to Patch #2106: Ability to choose period in 'Spent time' and count of watched issues on 'My page'. added

#10 Updated by Pavel Potcheptsov 9 months ago

Could you also add a predefined parameter "This week" which actually looks like

where("#{TimeEntry.table_name}.user_id = ? \
AND #{TimeEntry.table_name}.spent_on \
BETWEEN ? AND ?", User.current.id, \
Date.today - (Date.today.cwday - 1) % 7, \
Date.today - (Date.today.cwday - 1) % 7 + 6).

This is important for employees who have to register defined amount of hours per week and it's useful to see amount of time that you spent/registered during current week.

#11 Updated by Marius BALTEANU 9 months ago

Pavel Potcheptsov wrote:

Could you also add a predefined parameter "This week" which actually looks like
[...]
This is important for employees who have to register defined amount of hours per week and it's useful to see amount of time that you spent/registered during current week.

You should open a new issue for your request.

#12 Updated by Pavel Potcheptsov 9 months ago

Thanks, I've created #24346.

#13 Updated by Toshi MARUYAMA 9 months ago

  • Related to Feature #24346: My page - Spent time: add predefined parameter "This week" added

#14 Updated by Go MAEDA 8 months ago

  • Related to Feature #10713: My Page: Make the items on the page configurable added

#15 Updated by Go MAEDA 8 months ago

  • Duplicated by Feature #7508: modify the extent time of the "spent time" on "my page" added

#16 Updated by Tobias Fischer 7 months ago

Jean-Philippe Lang wrote:

Each user can now change the number of days that are displayed on "My Page".

There's a regression with that in Firefox on Mac (at least). When clicking the "gear" icon the input field is shown, but it is not clickable because the drag handler for positioning the box overlays it.
I cannot edit the input field. I can't even click the "Save" button.

Can you have a look please?

#17 Updated by Tobias Fischer 7 months ago

P.S.: I can only edit the text field when clicking the label to the right....

#18 Updated by Go MAEDA 7 months ago

Tobias Fischer wrote:

There's a regression with that in Firefox on Mac (at least). When clicking the "gear" icon the input field is shown, but it is not clickable because the drag handler for positioning the box overlays it.
I cannot edit the input field. I can't even click the "Save" button.

Probably you were in the "Personalize this page" screen. Please click the gear icon in the normal "My page" screen.

#19 Updated by Tobias Fischer 7 months ago

Go MAEDA wrote:

Probably you were in the "Personalize this page" screen. Please click the gear icon in the normal "My page" screen.

Yow are right, that works! But shouldn't we hide the "Plus" and the "Gear" icon then in "personalization mode" on this page to avoid such situations?

#20 Updated by Marius BALTEANU 6 months ago

In the "Personalize this page" screen, there are multiple issues:
1. Input field from time block is not clickable on Firefox mac (reported above by Tobias Fischer)
2. Save no of days for spent time block is not working because of the incorrect action form ("/my/page_layout" instead of "my/page"). It throws the following error "ActionController::RoutingError (No route matches [POST] "/my/page_layout"):"
3. The cursor on issue/time entry hover indicates that a contextual menu is available, but if you try to open the menu, it won't work because of the edit mode.

Attached is a patch that fixes all 3 issues. I chose to hide the contextual icons because I think that in the "Personalize this page" mode, the user should focus on how to arrange the blocks, and not on the block settings.

Any feedback is welcomed.

#21 Updated by Go MAEDA 6 months ago

  • Status changed from Closed to Reopened

Reopening to deal with #8761#note-20.

#22 Updated by Jean-Philippe Lang 6 months ago

  • Status changed from Reopened to Closed

Patch applied, thanks.

Also available in: Atom PDF