プロジェクト

全般

プロフィール

Vote #70599

未完了

Changesets link to issues even without the keyword prefix

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

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

0%

予定工数:
category_id:
3
version_id:
0
issue_org_id:
9117
author_id:
26356
assigned_to_id:
0
comments:
4
status_id:
1
tracker_id:
1
plus1:
0
affected_version:
closed_on:
affected_version_id:
35
ステータス-->[New]

説明

In settings, it is possible to configure a keyword that must be prefixed to #number in order to link the changeset to a redmine issue. However, redmine appears to ignore this and links the changeset to any issues that match numbers prefixed with hashes in the text of the comment.

For example, if I wrote in a commit message:

"Removed the text '#4' from this page (redmine #5)"

This will get associated (correctly) with issue 5, and incorrectly with issue 4, which it has nothing to do with. I have found a fix for the association, which is to remove the question mark following the second capturing subgroup on line 117 of app/models/changeset.rb. This makes the keyword mandatory in the scan_comment_for_issue_ids method. However, I can't figure out how to prevent the #4 from becoming a link to issue 4 in the revision history page. This seems to be a very low level thing, and I'm afraid I am not a rails developer so the trail went cold on that one.


journals

I should have stated that in my test case, I am assuming that the repository settings are configured to require a keyword prefix of 'redmine'.
--------------------------------------------------------------------------------
Did you remove the asterisk?
--------------------------------------------------------------------------------
Yes, my settings look like this.
--------------------------------------------------------------------------------
Slightly better example: We have multiple tracking systems, so sometimes there are #number references in our commit messages that do not relate to redmine. In this commit message:

redmine 3907, redmine #2839, #2138, helpdesk 1975, helpdesk #1974, #1503

I would expect redmine to link #2839 and possibly #2138, but not 3907, 1975, 1974 or 1503. In practice it links anything that matches the #number pattern, regardless of its prefix, which means it's linking the helpdesk request IDs to irrelevant redmine issues.
--------------------------------------------------------------------------------

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

  • カテゴリSCM_3 にセット

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

いいね!0
いいね!0