Request for controller_issues_bulk_edit_after_save hook
I suggest adding controller_issues_bulk_edit_after_save hook to Issues controller.Issue controller has hooks:
That is pairs - ..._before_save/..._after_save. All but the controller_issues_bulk_edit_before_save hook.I need this hook to notify external tool about adding journal to database. So I also suggest adding '':journal => journal'' to:
#3 Updated by Andriy Lesyuk about 11 years ago
Holger Just wrote:
You could register your code to the default active record
before_savehook of the Journal and/or the Issue model. Also, the current journal is available as the
@current_journalinstance variable in the controller.
before_save hook is called the Journal is created. That is if an external tool tries to get such Journal by ID it failes to find it...
#4 Updated by Holger Just about 11 years ago
Then hook yourself into
Journal.after_save. You can filter for issue journals there. Be aware that the whole journal stuff is currently undergoing changes. So don't trust that you will only have journal entries of issues.
Also, the current journal of an issue can be retrieved using
#6 Updated by Holger Just about 11 years ago
Journal#save is currently only called in
Issue#create_journal, which is called as an after_save hook of
Issue. Thus, once the journal is saved, its respective issue was already saved to the DB. Methods registered to the
Journal#after_save hook are only called once the Journal object was correctly saved to the database.
Depending on the transaction isolation level of your database, you will not see the journal entry from another transaction before the first one is actually committed though. This will only happen after the request was successfully completed.
#7 Updated by Andriy Lesyuk about 11 years ago
- File controller_issues_bulk_edit_after_save.patch added
Anyway my patch works... Without it I had troubles...
Redmine's code contains other hooks in pairs - [before|after]_save. So I believe it is logical to add controller_issues_bulk_edit_before_save. And it is very easy to add this hook - just by applying this path. Can I expect this to be done? Otherwise I will need to patch Redmine's code on every upgrade. Please...