Project

General

Profile

Actions

Defect #14281

closed

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

Added by Anders Lisspers over 11 years ago. Updated about 10 years ago.

Status:
Closed
Priority:
Normal
Category:
Issues
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed
Affected version:

Description

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

Actions #1

Updated by Marius BÄ‚LTEANU about 10 years ago

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

Actions #2

Updated by Toshi MARUYAMA about 10 years ago

  • Target version set to 2.6.0
Actions #3

Updated by Jean-Philippe Lang about 10 years ago

  • Subject changed from Parent issue auto complete does not follow to the "Allow cross-project issue relations" administration setting to Parent issue autocomplete does not follow to the "Allow cross-project subtasks" setting
  • Status changed from New to Closed
  • Assignee set to Jean-Philippe Lang
  • Resolution set to Fixed

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.

Actions

Also available in: Atom PDF