Project

General

Profile

Actions

Bug #25976

closed

bookmarks and autocompletion don't work for nested controller

Added by Ivan Necas almost 6 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Web Interface
Target version:
-
Difficulty:
Triaged:
No
Fixed in Releases:
Found in Releases:

Description

auto_complete_controller_name helper is used to determine both which controller to use for the auto_completion, as well as a value for bookmarks.controller attribute. In bookmarks, we test the controller to match the database table.

In #24040, the code send("#{auto_complete_controller_name}_path") (https://github.com/iNecas/foreman/commit/184f8d5ce23cfe208a696535bcea346074d8600a#diff-120a1c3293b2d4c051433c4f2c8a7a3bL1) was replaced with url: "#{auto_complete_controller_name}/auto_complete_search", so we suddenly started to assume that auto_complete_controller_name will automatically match the controller_path, which is not the case with nested controller (that we have in foreman_tasks).

As a result, we've hit https://projects.theforeman.org/issues/25427 and https://projects.theforeman.org/issues/25958/.

I think the solution should be to get the auto_complete_controller_name the meaning it had before #24040, so not assuming path where we expect the controller name, and use the Rails path helpers to determine the right url. This way, we can also check better that the autocomplete url is actually defined.


Related issues 3 (0 open3 closed)

Related to Foreman - Feature #24040: Move the search box in Hardware Models to a React componentClosedActions
Related to foreman-tasks - Bug #25427: "Request failed with status code 404" error on Tasks pageClosedAdam RuzickaActions
Related to foreman-tasks - Bug #25958: Bookmarks not working on Monitor > Tasks pageClosedIvan NecasActions
Actions #1

Updated by Ivan Necas almost 6 years ago

  • Found in Releases 1.20.0 added
Actions #2

Updated by Ivan Necas almost 6 years ago

  • Related to Feature #24040: Move the search box in Hardware Models to a React component added
Actions #3

Updated by Ivan Necas almost 6 years ago

  • Related to Bug #25427: "Request failed with status code 404" error on Tasks page added
Actions #4

Updated by Ivan Necas almost 6 years ago

  • Related to Bug #25958: Bookmarks not working on Monitor > Tasks page added
Actions #5

Updated by The Foreman Bot almost 6 years ago

  • Status changed from Assigned to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/6460 added
Actions #6

Updated by Timo Goebel almost 6 years ago

  • Fixed in Releases 1.22.0 added
Actions #7

Updated by Ivan Necas almost 6 years ago

  • Status changed from Ready For Testing to Closed
Actions #8

Updated by Ondřej Pražák over 5 years ago

  • Bugzilla link set to 1684291
Actions #9

Updated by Tomer Brisker over 5 years ago

  • Category set to Web Interface
Actions

Also available in: Atom PDF