Bug 1573822

Summary: Cannot add/update description on composite content view
Product: Red Hat Satellite Reporter: Anand Agrawal <aagrawal>
Component: Content ViewsAssignee: Samir Jha <sajha>
Status: CLOSED ERRATA QA Contact: Sanket Jagtap <sjagtap>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.3.1CC: bkearney, gpadholi, pcreech, rankumar, sjagtap, supatil
Target Milestone: 6.4.0Keywords: Regression, Triaged
Target Release: Unused   
Hardware: All   
OS: All   
Fixed In Version: tfm-rubygem-katello-3.7.0.rc1.2-0.1.rc1.2 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-10-16 19:30:56 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:

Description Anand Agrawal 2018-05-02 10:13:40 UTC
Description of problem:

When trying to add a description to a composite content view, it throws below error message:

"An error occurred updating the Content View: Cannot add repositories to a composite content view,Repositories from published Content Views are not allowed."

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Create a Composite Content View
2. Add repository (composite view) to it.
3. Publish Composite content view
4. Now goto Details tab and try to add description

Actual results:
Below error message:
"An error occurred updating the Content View: Cannot add repositories to a composite content view,Repositories from published Content Views are not allowed."

Expected results:

Description should be updated to the composite content view

Additional info:

Using hammer or API you can update the description of the composite content view without issue.

While doing so, from webUI, instead of taking only the description textarea in the form, it captures other information as well.

Comment 4 Samir Jha 2018-05-21 16:05:43 UTC
Created redmine issue http://projects.theforeman.org/issues/23660 from this bug

Comment 5 Brad Buckingham 2018-06-14 21:20:21 UTC
Moving to POST, since upstream PR is now merged.

Comment 6 Sanket Jagtap 2018-07-03 08:20:58 UTC
Build: Satellite 6.4.0 snap10

1) Created a Composite Content view
2) Edited the Description on it 

Successfully added and updated the description

2018-07-03T04:19:02 [I|app|] Started GET "/notification_recipients" for at 2018-07-03 04:19:02 -0400
2018-07-03T04:19:02 [I|app|39961] Processing by NotificationRecipientsController#index as JSON
2018-07-03T04:19:02 [I|app|39961] Current user: admin (administrator)
2018-07-03T04:19:02 [I|app|39961] Completed 200 OK in 14ms (Views: 0.3ms | ActiveRecord: 1.5ms)
2018-07-03T04:19:07 [I|app|] Started PUT "/katello/api/v2/content_views/5?organization_id=1" for at 2018-07-03 04:19:07 -0400
2018-07-03T04:19:08 [I|app|5ea9e] Processing by Katello::Api::V2::ContentViewsController#update as JSON
2018-07-03T04:19:08 [I|app|5ea9e]   Parameters: {"content_host_count"=>0, "composite"=>true, "component_ids"=>[6], "default"=>false, "force_puppet_environment"=>false, "version_count"=>2, "latest_version"=>"2.0", "auto_publish"=>false, "repository_ids"=>[39], "id"=>"5", "name"=>"rhev", "label"=>"rhev", "description"=>"this is description", "organization_id"=>"1", "organization"=>{"name"=>"Default Organization", "label"=>"Default_Organization", "id"=>1}, "created_at"=>"2018-07-02 12:25:23 UTC", "updated_at"=>"2018-07-02 13:20:44 UTC", "environments"=>[{"id"=>1, "name"=>"Library", "label"=>"Library", "permissions"=>{"readable"=>true}}], "repositories"=>[{"id"=>39, "name"=>"sat6tool7", "label"=>"sat6tool7", "content_type"=>"yum"}], "puppet_modules"=>[], "versions"=>[{"id"=>5, "version"=>"1.0", "published"=>"2018-07-02 12:27:52 UTC", "environment_ids"=>[]}, {"id"=>7, "version"=>"2.0", "published"=>"2018-07-02 13:20:16 UTC", "environment_ids"=>[1]}], "components"=>[{"id"=>6, "name"=>"test_cv 1.0", "content_view_id"=>6, "version"=>"1.0", "puppet_module_count"=>0, "environments"=>[{"id"=>1, "name"=>"Library", "label"=>"Library"}], "content_view"=>{"id"=>6, "name"=>"test_cv", "label"=>"test_cv", "description"=>nil, "next_version"=>2, "latest_version"=>"1.0"}, "repositories"=>[{"id"=>39, "name"=>"sat6tool7", "label"=>"sat6tool7"}]}], "content_view_components"=>[{"latest"=>false, "id"=>3, "created_at"=>"2018-07-02 13:20:44 UTC", "updated_at"=>"2018-07-02 13:20:44 UTC", "composite_content_view"=>{"id"=>5, "name"=>"rhev", "label"=>"rhev", "description"=>"this is a rhev CV", "next_version"=>3, "latest_version"=>"2.0", "version_count"=>2}, "content_view"=>{"id"=>6, "name"=>"test_cv", "label"=>"test_cv", "description"=>nil, "next_version"=>2, "latest_version"=>"1.0", "version_count"=>1}, "content_view_version"=>{"id"=>6, "name"=>"test_cv 1.0", "content_view_id"=>6, "version"=>"1.0", "puppet_module_count"=>0, "content_view"=>{"id"=>6, "name"=>"test_cv", "label"=>"test_cv", "description"=>nil}, "environments"=>[{"id"=>1, "name"=>"Library", "label"=>"Library"}], "repositories"=>[{"id"=>39, "name"=>"sat6tool7", "label"=>"sat6tool7"}]}}], "activation_keys"=>[], "next_version"=>"3.0", "last_published"=>"2018-07-02 13:20:16 UTC", "permissions"=>{"view_content_views"=>true, "edit_content_views"=>true, "destroy_content_views"=>true, "publish_content_views"=>true, "promote_or_remove_content_views"=>true}, "duplicate_repositories_to_publish"=>[], "api_version"=>"v2", "content_view"=>{"id"=>"5", "name"=>"rhev", "label"=>"rhev", "description"=>"this is description", "organization_id"=>"1", "default"=>false, "created_at"=>"2018-07-02 12:25:23 UTC", "updated_at"=>"2018-07-02 13:20:44 UTC", "composite"=>true, "next_version"=>"3.0", "force_puppet_environment"=>false, "auto_publish"=>false, "repository_ids"=>[39], "component_ids"=>[6]}}
2018-07-03T04:19:08 [I|app|5ea9e] Current user: admin (administrator)
2018-07-03T04:19:08 [I|aud|5ea9e] destroy event for Katello::ContentViewComponent with id 3
2018-07-03T04:19:08 [I|aud|5ea9e] update event for Katello::ContentView with id 5
2018-07-03T04:19:08 [I|aud|5ea9e] create event for Katello::ContentViewComponent with id 4
2018-07-03T04:19:09 [I|app|5ea9e]   Rendering /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.7.0.rc1.2/app/views/katello/api/v2/common/update.json.rabl within katello/api/v2/layouts/resource
2018-07-03T04:19:09 [I|app|5ea9e]   Rendered /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.7.0.rc1.2/app/views/katello/api/v2/common/update.json.rabl within katello/api/v2/layouts/resource (152.4ms)
2018-07-03T04:19:09 [I|app|5ea9e] Completed 200 OK in 1681ms (Views: 141.3ms | ActiveRecord: 112.3ms)

Comment 7 Ranjan Kumar 2018-08-21 15:51:04 UTC
@Sanket did you verifed this issue on name field? Getting same error while updating the ccv name.

Comment 8 Suraj Patil 2018-08-22 07:26:34 UTC

I have tested this issue in satellite 6.4.0-10. Editing Name and Description field are working now.

Comment 9 Bryan Kearney 2018-10-16 19:30:56 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, and where to find the updated
files, follow the link below.

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