Bug 1102451

Summary: content view filters controller does not honor name parameter
Product: Red Hat Satellite Reporter: Justin Sherrill <jsherril>
Component: APIAssignee: Christine Fouant <cfouant>
Status: CLOSED CURRENTRELEASE QA Contact: Ales Dujicek <adujicek>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.0.3CC: adujicek, cwelton, jhutar, jmontleo, mmccune
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
URL: http://projects.theforeman.org/issues/6064
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-07-02 14:05:07 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:

Description Justin Sherrill 2014-05-29 01:41:12 UTC
Description of problem:

Currently the content view filters controller does not honor hte name parameter.  

Using hammer you can reproduce this issue:

hammer content-view filter create --organization=Example_Org1  --content-view=SOE-OS  --type=erratum --name='Restrict Errata'  --inclusion=false  
hammer content-view filter create --organization=Example_Org1  --content-view=SOE-OS  --type=erratum --name='Restrict Errata2'  --inclusion=false  
hammer content-view filter rule create --content-view=SOE-OS  --content-view-filter='Restrict Errata'     --organization=Example_Org1  --start-date=2013-11-20


will result in:

  Error: content_view_filter found more than once

Comment 2 Bryan Kearney 2014-06-03 17:47:45 UTC
This requires a change to the index method of the content views controller. Look at the products index controller on how it accepts     

param :name, String, :desc => N_("Filter products by name")

Comment 3 Bryan Kearney 2014-06-03 18:35:38 UTC
*** Bug 1101689 has been marked as a duplicate of this bug. ***

Comment 4 Bryan Kearney 2014-06-03 21:08:58 UTC
*** Bug 1099974 has been marked as a duplicate of this bug. ***

Comment 5 Christine Fouant 2014-06-04 15:38:49 UTC
Created redmine issue http://projects.theforeman.org/issues/6064 from this bug

Comment 6 Bryan Kearney 2014-06-05 19:49:28 UTC
Moving to POST since upstream bug http://projects.theforeman.org/issues/6064 has been closed

Comment 9 Ales Dujicek 2014-06-16 14:26:31 UTC
Still cannot handle content view filter by name.
Now it is: Error: content_view_filter not found

# hammer content-view filter info --organization-id 284 --content-view cont-view --id 6
Filter ID:    6
Name:         Restrict
Type:         erratum
Inclusion:    false
Repositories: 

Rules:

# hammer content-view filter info --organization-id 284 --content-view cont-view --name Restrict
Error: content_view_filter not found

# hammer content-view filter rule create --content-view cont-view --content-view-filter Restrict --organization-id 284 --start-date=2013-11-20 
Could not create the filter rule:
  Error: content_view_filter not found

Comment 10 Bryan Kearney 2014-06-19 02:03:42 UTC
Moving to POST since upstream bug http://projects.theforeman.org/issues/6064 has been closed

Comment 13 Ales Dujicek 2014-06-23 12:26:14 UTC
Verified. Satellite-6.0.3-RHEL-6-20140620.0

# hammer content-view filter rule create --content-view=SOE-OS  --content-view-filter='Restrict Errata'     --organization=Example_Org1  --start-date=2013-11-20
Filter rule created

# hammer content-view filter info --organization-id 4 --content-view SOE-OS --id 1
Filter ID:    1
Name:         Restrict Errata
Type:         erratum
Inclusion:    false
Repositories: 

Rules:        
 1) ID:         1
    Start Date: 2013-11-20
    Created:    2014/06/23 12:16:50
    Updated:    2014/06/23 12:16:50

Comment 14 Bryan Kearney 2014-07-02 14:05:07 UTC
This was delivered with 6.0.3, which is the Satellite 6 Beta.