Project

General

Profile

Hooks List » History » Version 24

Kam Nazir, 2020-04-15 12:20
add controller_time_entries_bulk_edit_before_save and remove controller_issues_move_before_save

1 16 Mischa The Evil
h1. Redmine plugin hooks list
2 1 Jean-Philippe Lang
3 13 Mischa The Evil
{{>toc}}
4 2 Eric Davis
5 13 Mischa The Evil
To see the current list of plugin hooks, run @rake redmine:plugins:hook_list@ in the Redmine directory.
6 1 Jean-Philippe Lang
7 19 Mischa The Evil
|{background-color:#f88}. On Redmine version#43 and up the rake task has been deprecated.
8 20 @ go2null
As an alternative you can use either of the following in the Redmine directory (see message#36062).
9
<pre><code>grep -r call_hook *                                       # list of source lines with hook calls
10
grep -rohT 'call_hook([^)]*)'                             # list of hooks calls and source files
11 22 Mischa The Evil
grep -roh  'call_hook([^)]*)' | sort -u | grep '([^)]*)'  # list of hooks calls only
12 20 @ go2null
</code></pre>|
13 19 Mischa The Evil
14 14 Mischa The Evil
h2. Controller hooks
15
16
table{width:100%}.
17
|_. Name|_. Description|_. Context|
18
|@:controller_account_success_authentication_after@| |@:user@|
19
|@:controller_custom_fields_new_after_save@| |@:params, :custom_field@|
20
|@:controller_custom_fields_edit_after_save@| |@:params, :custom_field@|
21
|@:controller_issues_bulk_edit_before_save@|Passes the current issue and the params to the hook before saving. This can be used to set attributes on the issues.|@:params, :issue@|
22 15 Jie Ma
|@:controller_issues_new_before_save@| |@:params, :issue@|
23 14 Mischa The Evil
|@:controller_issues_new_after_save@| |@:params, :issue@|
24
|@:controller_issues_edit_before_save@| |@:params, :issue, :time_entry, :journal@|
25
|@:controller_issues_edit_after_save@| |@:params, :issue, :time_entry, :journal@|
26
|@:controller_journals_edit_post@| |@:params, :journal@|
27
|@:controller_messages_new_after_save@| |@:params, :message@|
28 1 Jean-Philippe Lang
|@:controller_messages_reply_after_save@| |@:params, :message@|
29 24 Kam Nazir
|@:controller_time_entries_bulk_edit_before_save@| |@:params, :time_entry@|
30 14 Mischa The Evil
|@:controller_timelog_edit_before_save@| |@:params, :time_entry@|
31
|@:controller_wiki_edit_after_save@| |@:params, :page@|
32 23 Kam Nazir
|@:controller_wiki_show_before_render@| |@:content, :format@|
33 14 Mischa The Evil
34
h2. Helper hooks
35
36
table{width:100%}.
37
|_. Name|_. Description|_. Context|
38
|@:helper_issues_show_detail_after_setting@|Passes data to the hook to allow it to set the label and value.|@:detail, :label, :value, :old_value@|
39
40
h2. Model hooks
41
42
table{width:100%}.
43
|_. Name|_. Description|_. Context|
44
|@:model_changeset_scan_commit_for_issue_ids_pre_issue_update@| |@:changeset, :issue@|
45
|@:model_project_copy_before_save@| |@:source_project, :destination_project@|
46
47 13 Mischa The Evil
h2. View hooks
48 1 Jean-Philippe Lang
49 13 Mischa The Evil
The current project is accessible using the @:project@ key of the context for all the view hooks.
50
51 3 Eric Davis
table{width:100%}.
52 1 Jean-Philippe Lang
|_. Name|_. Description|_. Context|
53 14 Mischa The Evil
|@:view_account_left_bottom@| |@:user@|
54
|@:view_account_right_bottom@| |@:user@|
55 15 Jie Ma
|@:view_account_login_top@| |(none)|
56
|@:view_account_login_bottom@| |(none)|
57 11 Mischa The Evil
|@:view_custom_fields_form_upper_box@| |@:custom_field, :form@|
58
|@:"view_custom_fields_form_#{@custom_field.type.to_s.underscore}"@| |@:custom_field, :form@|
59
|@:view_issue_statuses_form@| |@:issue_status@|
60
|@:view_issues_bulk_edit_details_bottom@|Appends content to the bulk edit form before the note|@:issues@|
61 18 Alexandr Ivanov
|@:view_issues_edit_notes_bottom@|Appends content to the note bottom before files form|@:issue, :notes, :form@|
62 1 Jean-Philippe Lang
|@:view_issues_form_details_bottom@|Appends content to the html table at the bottom of the issue form|@:issue, :form@|
63 12 Mischa The Evil
|@:view_issues_history_journal_bottom@| |@:journal@|
64
|@:view_issues_show_details_bottom@|Appends content to the bottom of the issues details table|@:issue@|
65 1 Jean-Philippe Lang
|@:view_issues_sidebar_issues_bottom@| |(none)|
66 11 Mischa The Evil
|@:view_issues_sidebar_planning_bottom@| |(none)|
67 1 Jean-Philippe Lang
|@:view_issues_sidebar_queries_bottom@| |(none)|
68 11 Mischa The Evil
|@:view_issues_context_menu_start@| |@:issues, :can, :back@|
69 12 Mischa The Evil
|@:view_issues_context_menu_end@| |@:issues, :can, :back@|
70 17 Etienne Massip
|@:view_issues_new_top@| |@:issue@|
71 12 Mischa The Evil
|@:view_issues_show_description_bottom@| |@:issue@|
72 15 Jie Ma
|@:view_issues_move_bottom@| |@:issue, :target_project, :copy@|
73 2 Eric Davis
|@:view_journals_notes_form_after_notes@| |@:journal@|
74 13 Mischa The Evil
|@:view_journals_update_rjs_bottom@| |@:page, :journal@|
75 1 Jean-Philippe Lang
|@:view_layouts_base_body_bottom@|Appends content to the end of the body section of the base layout|(none)|
76
|@:view_layouts_base_content@| |(none)|
77
|@:view_layouts_base_html_head@|Appends content to the html head of the base layout|(none)|
78 11 Mischa The Evil
|@:view_layouts_base_sidebar@| |(none)|
79
|@:view_my_account@| |@:user, :form@|
80 15 Jie Ma
|@:view_my_account_contextual@| |@:user@|
81 1 Jean-Philippe Lang
|@:view_projects_form@| |@:project, :form@|
82 13 Mischa The Evil
|@:view_projects_roadmap_version_bottom@| |@:version@|
83 11 Mischa The Evil
|@:view_projects_settings_members_table_header@|Appends content to the table header of a Project's Member setting|@:project@|
84
|@:view_projects_settings_members_table_row@|Appends content to the table row of a Project's Member setting|@:member, :project@|
85
|@:view_projects_show_left@| |@:project@|
86 1 Jean-Philippe Lang
|@:view_projects_show_right@| |@:project@|
87 15 Jie Ma
|@:view_projects_show_sidebar_bottom@| |@:project@|
88 2 Eric Davis
|@:view_repositories_show_contextual@|Appends content to the contextual menu in the Repositories pane|@:project, :repository@|
89 13 Mischa The Evil
|@:view_timelog_edit_form_bottom@| |@:time_entry, :form@|
90 15 Jie Ma
|@:view_settings_general_form@| |(none)|
91
|@:view_users_memberships_table_header@| |@:user@|
92
|@:view_users_memberships_table_row@| |@:user, :membership, :roles, :projects@|
93 2 Eric Davis
|@:view_users_form@| |@:user, :form@|
94 3 Eric Davis
|@:view_versions_show_bottom@| |@:version@|
95 14 Mischa The Evil
|@:view_versions_show_contextual@| |@:version, :project@|
96 2 Eric Davis
|@:view_welcome_index_left@| |@:project@|
97
|@:view_welcome_index_right@| |@:project@|
98 7 Eric Davis
99 13 Mischa The Evil
h2. Other hooks
100 7 Eric Davis
101
table{width:100%}.
102
|_. Name|_. Description|_. Context|