Defect #9090

Issue view does not show spent time if hours are zero

Added by Bo Hansen about 7 years ago. Updated over 1 year ago.

Status:NewStart date:2011-08-19
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:Time tracking
Target version:-
Resolution: Affected version:1.2.1

Description

If I add a time entry of 0 hours and nothing else has been logged on an issue spent time is shown as "Spent time: -".
It would be more natural if it showed 0 hours and had the normal link for showing logged time on the issue.

do_not_allow_spent_time_with_0_hours.patch Magnifier (1.95 KB) Marius BALTEANU, 2017-05-27 16:30


Related issues

Duplicated by Redmine - Feature #26357: Checking time tracking even if no hour spent Closed

History

#1 Updated by Marius BALTEANU over 1 year ago

Currently, you can add a spent time with 0 hours which is shown in time_entries#index, but not in the issue page (the defect reported in this ticket).

Because I don't see any real reason to allows spent time with 0 hours, I made a patch that restricts this.

#2 Updated by Go MAEDA over 1 year ago

  • Target version set to 3.4.0

The existing code source:tags/3.3.3/app/models/time_entry.rb#L120 obviously intends not to accept 0. Setting target version to 3.4.0.

Thank you for submitting the fix.

#3 Updated by Jean-Philippe Lang over 1 year ago

  • Target version deleted (3.4.0)

Go MAEDA wrote:

The existing code source:tags/3.3.3/app/models/time_entry.rb#L120 obviously intends not to accept 0. Setting target version to 3.4.0.

No, this code intends not to accept negative values. 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.

#4 Updated by Mischa The Evil over 1 year ago

  • Duplicated by Feature #26357: Checking time tracking even if no hour spent added

Also available in: Atom PDF