プロジェクト

全般

プロフィール

Vote #69770

未完了

Revisions that reference issues are duplicated if their repository is listed for a project and its subprojects

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

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

0%

予定工数:
category_id:
3
version_id:
0
issue_org_id:
8225
author_id:
32646
assigned_to_id:
0
comments:
5
status_id:
1
tracker_id:
1
plus1:
0
affected_version:
closed_on:
affected_version_id:
31
ステータス-->[New]

説明

If you have a project with a configured SCM repository and it has a subproject with the same SCM repository configured (e.g., if you have a subproject for a specific category of work on the main project and they have the same repository specified in Redmine), then a revision in the SCM repository that references an issue by its number will be duplicated in the list of revisions referencing that issue.

The reason for this is that Changeset::scan_comment_for_issue_ids in app/models/changeset.rb does not check whether the changeset and issue belong to the same project, so the revision will end up being referenced to the issue once in the project that owns the issue and once in each other project that shares the SCM repository, even though they do not own the issue.

This problem exists in the current 1.1-stable branch in svn, as of r5548 (last change to 1.1-stable appears to be r5503).


journals

Here is a patch that resolves the problem. It makes one change in total, to line 128 of app/models/changeset.rb which, after applying this patch, will verify that the issue and changeset have the same project before adding the reference. It has been lightly tested in a working environment.
--------------------------------------------------------------------------------
erergergeregerg
--------------------------------------------------------------------------------
relates or better duplicates #6857
--------------------------------------------------------------------------------
The patch is flawed. If the subproject has a repo that is different from the parent project but the commit message in the subproject repo references an issue in the parent project (I do this all the time) then the issue would not be linked with your patch. It needs to instead truly check for duplicates rather than requiring exact issue-project-repo match. Or maybe it should be configurable, but I do agree the duplicate commit links are annoying.
--------------------------------------------------------------------------------

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


related_issues

duplicates,New,6857,git references leaking from subproject to project

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

  • カテゴリSCM_3 にセット

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

いいね!0
いいね!0