プロジェクト

全般

プロフィール

Vote #79464

未完了

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

Admin Redmine さんが約4年前に追加. 約4年前に更新.

ステータス:
Needs feedback
優先度:
通常
担当者:
-
カテゴリ:
Hook requests_54
対象バージョン:
-
開始日:
2022/05/09
期日:
進捗率:

0%

予定工数:
category_id:
54
version_id:
0
issue_org_id:
29378
author_id:
359849
assigned_to_id:
0
comments:
3
status_id:
10
tracker_id:
3
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[Needs feedback]

説明

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


journals

--------------------------------------------------------------------------------
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 https://guides.rubyonrails.org/active_record_callbacks.html 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.
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------

Admin Redmine さんが約4年前に更新

  • カテゴリHook requests_54 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0