Feature #9726

Add the controller_timelog_edit_before_save hook to IssuesController.new()

Added by Max Haventon about 11 years ago. Updated about 11 years ago.

Status:NewStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:Plugin API
Target version:-
Resolution:

Description

The controller_timelog_edit_before_save hook is available in several of the TimelogController's methods. However, since TimeEntries can be created when updating an Issue, I found myself needing the same hook in IssuesController.new().

There is no hook in IssuesController.new() that lets plugin developers work with the TimeEntry.

I've attached the proposed hook-addition as one patch, and additionally a patch containing the plugin that utilizes it as an example.

I realize that it might be bad practice to have a hook named 'controller_timelog_*' outside of the TimelogController, but I think it makes sense to be able to use the same hook, as the plugin demonstrates.

ADD_CONTROLLER_TIMELOG_EDIT_BEFORE_SAVE_HOOK_TO_ISSUES_CONTROLLER.diff Magnifier - Proposed hook addition (631 Bytes) Max Haventon, 2011-12-05 19:53

REDMINE_TIMELOG_MEMORY_PLUGIN.diff Magnifier - Example plugin (3.66 KB) Max Haventon, 2011-12-05 19:53

History

#1 Updated by Max Haventon about 11 years ago

The patch assumes Redmine @ r8004.

Also available in: Atom PDF