プロジェクト

全般

プロフィール

Vote #81593

未完了

Call Redmine::Hook.call_hook(:model_changeset_scan_commit_for_issue_ids_pre_issue_update) not only in case of a fixed issue with 'fixes' keyword

Admin Redmine さんが約2年前に追加.

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

0%

予定工数:
category_id:
0
version_id:
0
issue_org_id:
35749
author_id:
532722
assigned_to_id:
0
comments:
0
status_id:
1
tracker_id:
2
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[New]

説明

In

app/models/changeset.rb

there is a hook :model_changeset_scan_commit_for_issue_ids_pre_issue_update which is called only if an issue was marked as fixed ('fixes' keyword) within a commit message.

So, there is no possibility to run an own adapter or do other things when an issue just changed within a commit message with 'refs' keyword.

Moving the lines

    Redmine::Hook.call_hook(:model_changeset_scan_commit_for_issue_ids_pre_issue_update,
                            {:changeset => self, :issue => issue, :action => action})

in the

def fix_issue(issue, action)

function after the fix_issue() and log_time() call

          unless repository.created_on && committed_on && committed_on < repository.created_on
            fix_issue(issue, action) if fix_keywords.include?(action)
            log_time(issue, hours) if hours && Setting.commit_logtime_enabled?
            Redmine::Hook.call_hook(:model_changeset_scan_commit_for_issue_ids_pre_issue_update,
                            {:changeset => self, :issue => issue, :action => action})
          end

will invoke the :model_changeset_scan_commit_for_issue_ids_pre_issue_update hook also if there was just the 'refs' keyword used.

Well, is there a reason to call this hook only in case an issue was changed to 'fixed'?

表示するデータがありません

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

いいね!0