プロジェクト

全般

プロフィール

Vote #74020

完了

Parent issue autocomplete does not follow to the "Allow cross-project subtasks" setting

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

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

0%

予定工数:
category_id:
2
version_id:
81
issue_org_id:
14281
author_id:
80204
assigned_to_id:
1
comments:
3
status_id:
5
tracker_id:
1
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[Closed]

説明

When editing an issue, you're able to get auto completion for the parent issue ID by typing a search term in the input box. However, as of r10587 this does not search the current project's issues but issues across all projects.

If I understand correctly, the call to @#{escape_javascript auto_complete_issues_path}@ on line 46 of app/views/issues/_attributes.html.erb should (1) pass the current projects ID as @project_id@ parameter and (2) pass the @scope@ parameter depending on the "Allow cross-project issue relations" administration setting.

A change of line 46 in _attributes.html.erb as follows has been tested and seems to be working in our environment at least:

-<%= javascript_tag "observeAutocompleteField('issue_parent_issue_id', '#{escape_javascript auto_complete_issues_path}')" %>
+<%= javascript_tag "observeAutocompleteField('issue_parent_issue_id', '#{escape_javascript auto_complete_issues_path(:project_id => @issue.project, :scope => (Setting.cross_project_issue_relations? ? 'all' : nil))}')" %>

@$ ruby script/about@

Environment:
  Redmine version                          2.2.2.stable
  Ruby version                             1.8.7 (x86_64-linux)
  Rails version                            3.2.11
  Environment                              production
  Database adapter                         Mysql2
Redmine plugins:
  redmine_add_subissue_menuitem            0.0.1
  redmine_favourite_projects               0.6.2
  redmine_ics_export                       2.0.0.dev
  redmine_knowledgebase                    2.2.0
  redmine_time_tracker                     0.4

journals

This patch works also with Redmine version 2.5.1 and is a minor change. Can be catch in the next Redmine version?
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
Parent issue selection does not depend on @Setting.cross_project_issue_relations@ but @Setting.cross_project_subtasks@ introduced in r10587. The fix is committed in r13400, thanks for pointing this out.
--------------------------------------------------------------------------------

Admin Redmine さんがほぼ4年前に更新

  • カテゴリIssues_2 にセット
  • 対象バージョン2.6.0_81 にセット

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

いいね!0
いいね!0