Vote #74020
完了Parent issue autocomplete does not follow to the "Allow cross-project subtasks" setting
0%
説明
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.
--------------------------------------------------------------------------------