Project

General

Profile

Actions

Bug #24937

closed

Validation failed: Cannot set auto publish to a non-composite content view

Added by Andrew Kofink over 5 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Content Views
Target version:
Difficulty:
Triaged:
Yes
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1626178

Description of problem:

While creating a new content view, If we select composite content view checkbox and Auto publish checkbox as well, but realised no need of composite content view so unchecked the checkbox composite content view, this will automatically uncheck the autopublish checkbox. But when clicking 'Save' button, it does no action i.e CV not being created.

While checking the firebug console: we see below errors:

{"displayMessage":"Validation failed: Cannot set auto publish to a non-composite content view","errors"
:{"base":["Cannot set auto publish to a non-composite content view"]}}

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

How reproducible:

Always
Steps to Reproduce:
1. Create a new content view, enter details like name, description
2. Check the composite view checkbox and auto publish checkbox
3. Uncheck the composite view checkbox
4. This will automatically uncheck the auto-publish checkbox
5. Click on 'Save', Nothing happens
6. In the log, you will see
~~
2018-09-06T13:00:24 [I|app|] Started POST "/katello/api/v2/content_views?organization_id=1" for 192.168.122.1 at 2018-09-06 13:00:24 -0400
2018-09-06T13:00:24 [I|app|39431] Processing by Katello::Api::V2::ContentViewsController#create as JSON
2018-09-06T13:00:24 [I|app|39431] Parameters: {"organization_id"=>"1", "name"=>"anand", "label"=>"anand", "composite"=>false, "auto_publish"=>true, "api_version"=>"v2", "content_view"=>{"name"=>"anand", "label"=>"anand", "organization_id"=>"1", "composite"=>false, "auto_publish"=>true}}
2018-09-06T13:00:24 [I|app|39431] Current user: admin (administrator)
2018-09-06T13:00:24 [E|app|39431] <Class> ActiveRecord::RecordInvalid
2018-09-06T13:00:24 [E|app|39431] base: ["Cannot set auto publish to a non-composite content view"]
2018-09-06T13:00:24 [I|app|39431] Completed 422 Unprocessable Entity in 151ms (Views: 0.3ms | ActiveRecord: 85.8ms)
~~
Actual results:

Still auto publish is "auto_publish"=>true

Expected results:

auto publish should be set to false
Additional info:

Actions #1

Updated by The Foreman Bot over 5 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/Katello/katello/pull/7703 added
Actions #2

Updated by Andrew Kofink over 5 years ago

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

Updated by Andrew Kofink over 5 years ago

  • Subject changed from Validation failed: Cannot set auto publish to a non-composite content view to Validation failed: Cannot set auto publish to a non-composite content view
  • Target version set to Katello 3.9.0
  • Triaged changed from No to Yes
Actions

Also available in: Atom PDF