Defect #15044
closedPatch for giving controller_issues_edit_after_save api hook the correct context
0%
Description
The API hooks "controller_issues_edit_before/after_save" are not given the correct context (i.e. the same context that "controller_issues_new_before/after_save" get.)
Expected behavior: "controller_issues_new_after_save" and "controller_issues_edit_after_save" should be given the same context.
Actual behavior: "controller_issues_edit_after_save"'s context lacks a controller, project, request, and hook_caller. Plugins must use crazy work-arounds to gain access to them.
Fix: Issue#save_issue_with_child_records has no particular need to be in the Issue model. Moving it to IssuesController allows for a simple fix with minimal impact.
This is my first Redmine patch, and I'm happy to submit it through github, svn, etc, but I've attached it here for comment.
Files