Bug 1367123

Summary: Unpublished content views displayed in the content view list on the composite content view page [Web/UI]
Product: Red Hat Satellite Reporter: Oleg Lymarchuk <olymarch>
Component: Content ViewsAssignee: Brad Buckingham <bbuckingham>
Status: CLOSED NOTABUG QA Contact: Og Maciel <omaciel>
Severity: high Docs Contact:
Priority: medium    
Version: 6.2.0CC: bbuckingham, bkearney, dlezzoum, jcallaha, olymarch, omaciel, paji
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: UnusedFlags: dlezzoum: needinfo-
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-07-24 05:52:59 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:
Attachments:
Description Flags
full error message text
none
screencast none

Description Oleg Lymarchuk 2016-08-15 15:29:12 UTC
Created attachment 1190932 [details]
full error message text

Description of problem:
Unpublished content views are included to the list of content views to be added as a composite content view components. There are also no client-side verification, so no errors on an attempt to add such an item are raised.  

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


How reproducible: 
fully reproducible (= 100%)


Steps to Reproduce:
1. Log in to Satellite WebUI
2. Create a non-composite content view and do NOT publish it
3. Create a composite content view
4. Select an unpublished content view from a list and try to add it

Actual results:
The error message in console appears (please see the attachment for the full text of the message)


Expected results:
* A client-side error popup/modal with an appropriate explanation
OR
* No unpublished CV's in the CV list

Comment 1 Oleg Lymarchuk 2016-08-15 15:34:15 UTC
Created attachment 1190934 [details]
screencast

and also a screencast

Comment 3 Brad Buckingham 2016-08-26 19:00:58 UTC
Created redmine issue http://projects.theforeman.org/issues/16346 from this bug

Comment 4 Brad Buckingham 2016-08-29 22:30:37 UTC
Upstream katello PR: https://github.com/Katello/katello/pull/6283

Comment 5 Bryan Kearney 2016-08-31 10:18:36 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/16346 has been resolved.

Comment 9 Og Maciel 2016-10-11 20:13:46 UTC
The fix for this issue is that non-published content views will no longer be displayed as being available for association to composite content views. Following the same steps mentioned in the original issue, the non-published content view cannot be associated to a composite content view.

Comment 10 Djebran Lezzoum 2017-06-30 10:01:02 UTC
The automation test is failing for this bug on the latest snap 6.3 snap 4

Comment 15 Brad Buckingham 2017-07-17 19:33:31 UTC
Djebran, Oleg, 

Based upon comment 14, any objection to closing this bug?

The changes that Partha mentioned were to address bug 1177766.  As a result, the behavior requested by this bug is no longer valid and has been replaced by that solution.  Since the CV publishing now takes in to account if a CV has no versions, we should no longer see the previous side affects.

Comment 16 Djebran Lezzoum 2017-07-20 15:13:05 UTC
Brad, 

1. I created a content view X (without publishing it)
2. Created a composite content view Y
3. Added cv X to composite cv Y
4. Published composite content Y

result:
  composite content view was published successfully, even if content view X was not published

is this a valid scenario?

Comment 17 Brad Buckingham 2017-07-20 15:21:50 UTC
Based on feedback from Partha, with the introduction of 'latest' support, it should be a valid scenario.  In the scenario from comment 16, no version is available for X; therefore, the default is 'latest' on the composite.  Since there is no version of X when composite Y is published, it is simply omitted from the new version of Y.

Based on the new feature of 'latest', I believe this becomes 'notabug'.

Comment 18 Brad Buckingham 2017-07-20 18:46:32 UTC
Adding needinfo back based upon comment 15.

Comment 19 Djebran Lezzoum 2017-07-21 12:06:52 UTC
Thanks Brad for the explanations

Since this is a predicable scenario from now on (with the new functionality), I have no object to close it as NOTABUG, will fix the automation tests accordingly.

Comment 20 Bryan Kearney 2017-07-24 05:52:59 UTC
Closing this out as NOTABUG based on Comment 19.