Patch #24005
closedSettings to accept 0 hours time entries and for maximum hours per user and day
Added by Helder Manuel Torres Vieira about 8 years ago. Updated over 7 years ago.
0%
Description
This patch modifies the existing limitation on the TimeEntry model to enable the introduction of hours with values 0 or superior to 24 hours.
About the limitation for values superior to 24 hours, this is due to having 1 time value based on a concrete day, whereby the maximum hours that are usable per day are 24.
About the limitation to introduce hours with value 0, this is due to the objective of a time entry is to be able to enter a time dedication superior to 0 minutes, for what makes no sense for the users to be able to create this kind of entries.
The patch has been tested on the last Trunk version (15839)
Files
time_entries_day.diff (2.77 KB) time_entries_day.diff | Helder Manuel Torres Vieira, 2016-10-05 20:09 | ||
time_2.png (36.2 KB) time_2.png | Helder Manuel Torres Vieira, 2016-10-05 20:10 | ||
time_1.png (46 KB) time_1.png | Helder Manuel Torres Vieira, 2016-10-05 20:10 | ||
time_3.png (40.2 KB) time_3.png | Helder Manuel Torres Vieira, 2016-10-05 20:10 | ||
time_4.png (62.6 KB) time_4.png | Helder Manuel Torres Vieira, 2016-10-05 20:10 | ||
exceed time entry 2nd entry.PNG (42.1 KB) exceed time entry 2nd entry.PNG | max time 2nd entry | Randa Bustami, 2017-07-26 10:52 | |
exceed time entry.png (23.6 KB) exceed time entry.png | max time first entry | Randa Bustami, 2017-07-26 10:52 |
Related issues
Updated by Helder Manuel Torres Vieira about 8 years ago
- File time_1.png time_1.png added
- File time_2.png time_2.png added
- File time_3.png time_3.png added
- File time_4.png time_4.png added
Updated by Toshi MARUYAMA about 8 years ago
- Subject changed from Improve the hours validation on the TimeEntry model to Reject over 24 hours on time entry
Updated by César DJ Caësar 9114 over 7 years ago
- for the moment, "0" hour because I use custom fields for time tracking, allowing me to count "seconds" or "days";
- it should always be possible to enter all the hours spent when somebody is back from a mission. For example, I often send my dev outside, where they don't have access to Redmine. When they're back I just ask them the number of hours IN TOTAL, and not to enter the number of hours for each day. It's far more confortable.
I think that limitations should always be an option and not a compulsory restiction for all the users :)
Updated by Andrey Lobanov (RedSoft) over 7 years ago
César Lizurey wrote:
Personally, I don't agree because I need:
- for the moment, "0" hour because I use custom fields for time tracking, allowing me to count "seconds" or "days";
- it should always be possible to enter all the hours spent when somebody is back from a mission. For example, I often send my dev outside, where they don't have access to Redmine. When they're back I just ask them the number of hours IN TOTAL, and not to enter the number of hours for each day. It's far more confortable.
I think that limitations should always be an option and not a compulsory restiction for all the users :)
Totally agree with César Lizurey.
Updated by Mischa The Evil over 7 years ago
- Subject changed from Reject over 24 hours on time entry to Reject 0 hour and over 24 hours on time entry
Helder Manuel Torres Vieira wrote:
About the limitation to introduce hours with value 0, [...]
FWIW: Jean-Philippe Lang said the following about this in #9090#note-3:
[...] Some people might use time entries with 0 hours for specific purpose, I'm not really in favor of removing this possibility. We need more feedback before doing this change.
Updated by Mischa The Evil over 7 years ago
- Has duplicate Defect #26450: user can enter more than 24 hours in the same day added
Updated by Jean-Philippe Lang over 7 years ago
About the limitation for values superior to 24 hours, this is due to having 1 time value based on a concrete day, whereby the maximum hours that are usable per day are 24.
We should check existing timelogs to make sure that the total hours logged by a user on one day is <= 24h. Checking that each single timelog is <= 24h like in the proposed patch does not prevent users to log more than 24h on one day.
Right?
- Accept 0h timelogs (yes/no)
- Maximum hours that a user can log on a single day
Updated by Randa Bustami over 7 years ago
Jean-Philippe Lang wrote:
About the limitation for values superior to 24 hours, this is due to having 1 time value based on a concrete day, whereby the maximum hours that are usable per day are 24.
We should check existing timelogs to make sure that the total hours logged by a user on one day is <= 24h. Checking that each single timelog is <= 24h like in the proposed patch does not prevent users to log more than 24h on one day.
I think we definitely need to make this restrictions configurable, for example with these 2 settings:
Right?
- Accept 0h timelogs (yes/no)
- Maximum hours that a user can log on a single day
this will be excellent, in which version we can see this pls ?
Updated by Jean-Philippe Lang over 7 years ago
- Subject changed from Reject 0 hour and over 24 hours on time entry to Settings to accept 0 hours time entries and for maximum hours per user and day
- Status changed from New to Closed
- Assignee set to Jean-Philippe Lang
- Target version set to 4.0.0
Randa Bustami wrote:
this will be excellent, in which version we can see this pls ?
The feature is committed in r16832, it will included in 4.0.
Updated by Randa Bustami over 7 years ago
- File exceed time entry 2nd entry.PNG exceed time entry 2nd entry.PNG added
- File exceed time entry.png exceed time entry.png added
we had Applied the code and the system prevent to log more than 24 hours/ entry. but the issue is still we can log more than 24 hours in another entry for the same date
the system should have 2 validation
1- check hours not to exceed 24 hours
2- check if the user have another entry in the same date so the total of all entries for that date should not exceed 24 hours
pls check the attached screenshot
Updated by Jean-Philippe Lang over 7 years ago
Randa Bustami wrote:
we had Applied the code and the system prevent to log more than 24 hours/ entry. but the issue is still we can log more than 24 hours in another entry for the same date
Make sure that you have configured the maximum hours that can be logged on one day (eg. 24h). By default, it is set to 999: go to Admin -> Settings -> Time Tracking -> Maximum hours that can be logged per day and user.
This issue is closed, please reopen a new one if it does not work as expected.
Updated by Marius BĂLTEANU over 6 years ago
- Has duplicate Feature #1300: Log time control added