Bug 1826734

Summary: Tasks uses wrong controller name for bookmarks
Product: Red Hat Satellite Reporter: Adam Ruzicka <aruzicka>
Component: Tasks PluginAssignee: Ron Lavi <rlavi>
Status: CLOSED ERRATA QA Contact: Peter Ondrejka <pondrejk>
Severity: high Docs Contact:
Priority: high    
Version: 6.7.0CC: ahumbe, aruzicka, dgross, dhjoshi, egolov, jalviso, ofalk, peter.vreman, sadas
Target Milestone: 6.8.0Keywords: Regression, Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: tfm-rubygem-foreman-tasks-2.0.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1851159 (view as bug list) Environment:
Last Closed: 2020-10-27 13:02:09 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1122832    

Description Adam Ruzicka 2020-04-22 13:05:07 UTC
Description of problem:
Version of tasks in 6.7 uses 'foreman_tasks/tasks' as controller name for bookmarks, but Satellites <6.7 used 'foreman_tasks_tasks'.

This has several outcomes:
1) The user cannot see the default bookmarks we ship
2) The user can CRUD new bookmarks, we will need to take care of this when fixing this.
3) If the user upgraded from previous release, they won't be able to see any of their old bookmarks.

Version-Release number of selected component (if applicable):
tfm-rubygem-foreman-tasks-0.17.5.2-1.el7sat.noarch

How reproducible:
Always

Steps to Reproduce:
1. Go to tasks index
2. Run the following on satelltie to get counts of bookmarks
foreman-rake console <<EOF
%w(_ /).each do |separator|
  controller = 'foreman_tasks' + separator + 'tasks'
  puts "#{controller}: #{Bookmark.where(:controller => controller).count}"
end
EOF

3. Click the bookmark button next to the search bar
4. Create a new bookmark
5. Rerun command from 2.


Actual results:
There are no bookmarks in step 3, although data from step 2 say there should be some. In the output of step 5, we can see the number of bookmarks assigned with foreman_tasks/tasks goes up.

Expected results:
Bookmarks we ship and bookmarks user created before upgrade are shown there. In the output of step 5, we can see the number of bookmarks assigned with foreman_tasks_tasks goes up, foreman_tasks/tasks is zero.

Comment 3 Adam Ruzicka 2020-04-22 13:07:33 UTC
Created redmine issue https://projects.theforeman.org/issues/29594 from this bug

Comment 4 Adam Ruzicka 2020-04-22 14:04:54 UTC
*** Bug 1826756 has been marked as a duplicate of this bug. ***

Comment 6 Brad Buckingham 2020-05-11 09:56:02 UTC
*** Bug 1833264 has been marked as a duplicate of this bug. ***

Comment 7 Bryan Kearney 2020-05-14 08:01:16 UTC
Upstream bug assigned to rlavi

Comment 8 Bryan Kearney 2020-05-14 08:01:19 UTC
Upstream bug assigned to rlavi

Comment 10 Peter Ondrejka 2020-06-25 09:49:02 UTC
Verified on Satellite 6.8 snap 6, default and added bookmarks are displayed in tasks UI, upgrade automation being added

Comment 13 errata-xmlrpc 2020-10-27 13:02:09 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Important: Satellite 6.8 release), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2020:4366