Project

General

Profile

Actions

Feature #13596

closed

Add setting to allow/deny time logging on closed issues

Added by Filou Centrinov about 12 years ago. Updated 17 days ago.

Status:
Closed
Priority:
Normal
Category:
Time tracking
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed

Description

Time logging should be only possible for issues which are open. May an options is added to the time tracking rights for a role.


Files


Related issues

Related to Redmine - Feature #3322: Setting to restrict spent times on future datesClosedGo MAEDA2009-05-08

Actions
Related to Redmine - Feature #13244: Restrict log time for old daysReopened

Actions
Actions #1

Updated by Filou Centrinov almost 12 years ago

Actions #2

Updated by Pavel Potcheptsov over 11 years ago

This works for me.
Change issue.status_id to number that points to your Closed issues.

Actions #3

Updated by Toshi MARUYAMA over 8 years ago

Actions #4

Updated by Toshi MARUYAMA over 8 years ago

Actions #5

Updated by Toshi MARUYAMA over 8 years ago

Actions #6

Updated by Toshi MARUYAMA over 8 years ago

  • Related to Feature #3322: Setting to restrict spent times on future dates added
Actions #7

Updated by Marius BĂLTEANU 4 months ago

Actions #8

Updated by Marius BĂLTEANU 4 months ago

  • Assignee set to Marius BĂLTEANU
  • Target version set to 6.1.0

A patch has been posted in #13244.

Actions #10

Updated by Marius BĂLTEANU 17 days ago

  • Subject changed from Allow time logging only for open issues to Add setting to allow/deny time logging on closed issues
  • Status changed from New to Resolved
  • Resolution set to Fixed

Setting added in r23586, you can now configure the desired behaviour.

Actions #11

Updated by Marius BĂLTEANU 17 days ago

  • Status changed from Resolved to Closed

All tests pass now.

Actions #12

Updated by Holger Just 17 days ago

  • Status changed from Closed to Reopened

Thank you Marius.

On doubt though: in the issue.rb patch in r23586, you refer to Setting.timelog_accept_future_dates?. Shouldn't this refer to Setting.timelog_accept_closed_issues? with a different boolean negation instead, i.e.

# Returns true if user or current user is allowed to log time on the issue
def time_loggable?(user=User.current)
  user.allowed_to?(:log_time, project) && (Setting.timelog_accept_closed_issues? || !closed?)
end
Actions #13

Updated by Marius BĂLTEANU 17 days ago

Holger Just wrote in #note-12:

Thank you Marius.

On doubt though: in the issue.rb patch in r23586, you refer to Setting.timelog_accept_future_dates?. Shouldn't this refer to Setting.timelog_accept_closed_issues? with a different boolean negation instead, i.e.

[...]

Yes, I saw that mistake right after I've committed the change and a test started to failed. The problem is already fixed in r23589.

Actions #14

Updated by Holger Just 17 days ago

  • Status changed from Reopened to Closed

I see, thanks. Sorry that I missed that.

Actions #15

Updated by Marius BĂLTEANU 17 days ago

Holger Just wrote in #note-14:

I see, thanks. Sorry that I missed that.

Don't worry, thanks for reviewing the changes!

Actions

Also available in: Atom PDF