Patch #29378

More call_hooks for projects, issue statusses, time entries, etc.

Added by Jonas Ineveld, van over 4 years ago. Updated over 4 years ago.

Status:Needs feedbackStart date:
Priority:NormalDue date:
Assignee:-% Done:


Category:Hook requests
Target version:-


Currently there are only functional call_hooks for issues, and with that, i mean the 'controller_issues_edit_after_save' etc.
Because i'm working on a seperate app, connected with redmine on the backend, i need more hooks to hook my 'update API' to.

For now i've created the call_hooks for creation of a project, and for the deletion of a issue.

Would it be something if these changes would go back into core? I can imagine more uses for these type of hooks.

Svn patch file is included

call_hooks_patch_project_issue_destroy.patch Magnifier (1.15 KB) Jonas Ineveld, van, 2018-08-13 14:32


#1 Updated by Go MAEDA over 4 years ago

  • Tracker changed from Defect to Patch

#2 Updated by Holger Just over 4 years ago

Do you strictly need these controller hooks to distinguish updates done by the controller from other updates?

Most of the time, people are interested in e.g. any update of wiki pages or projects. Here, it is already possible to use Active Record callbacks on the models which don't require callbacks in the controller in all places that could touch these models. See for details. You could e.g. register a new hook for after_save (or after_update) or the Project model or an after_destroy hook of the Issue model.

Since these hooks are on a model level, you won't have access to the controller params though.

#3 Updated by Holger Just over 4 years ago

  • Status changed from New to Needs feedback

Also available in: Atom PDF