Project

General

Profile

Bug #19724

Support importing/exporting erratum filters

Added by David Davis about 2 years ago. Updated 12 months ago.

Status:
New
Priority:
Normal
Assignee:
Category:
content-view-filters
Target version:
-
Difficulty:
Triaged:
Yes
Bugzilla link:
Pull request:
Team Backlog:
Fixed in Releases:
Found in Releases:

Description

Create an erratum filter and export it via csv. You'll get something like:

Name,Content View,Organization,Type,Description,Repositories,Rules
ERRATFILTER,Test,Default Organization,Exclude unknown,,"","start = 2012-01-01,end = 2013-01-01,""types = bugfix,enhancement,security""" 
PKGFILTER,Test,Default Organization,Exclude Packages,,zoolander,test|=|3.0

Notice the type for my ERRATFILTER is unknown.

Relevant code: https://git.io/vHBhC


Related issues

Related to Hammer CLI CSV - Bug #19915: Support importing/exporting package group filtersNew2017-06-04
Blocked by Hammer CLI CSV - Bug #19927: Hammer csv import package rules doesn't handle rules with the same nameClosed2017-06-05

History

#1 Updated by David Davis about 2 years ago

Importing these errata filters doesn't work:

RuntimeError: Invalid content type 'unknown' provided. Content types can be one of rpm, package_group, erratum, docker
 | /home/vagrant/katello/app/models/katello/content_view_filter.rb:73:in `class_for'
 | /home/vagrant/katello/app/models/katello/content_view_filter.rb:115:in `create_for'
 | /home/vagrant/katello/app/controllers/katello/api/v2/content_view_filters_controller.rb:43:in `create'
 | /home/vagrant/.rvm/gems/ruby-2.2.4/gems/actionpack-4.2.8/lib/action_controller/metal/implicit_render.rb:4:in `send_action'
 | /home/vagrant/.rvm/gems/ruby-2.2.4/gems/actionpack-4.2.8/lib/abstract_controller/base.rb:198:in `process_action'
 | /home/vagrant/.rvm/gems/ruby-2.2.4/gems/actionpack-4.2.8/lib/action_controller/metal/rendering.rb:10:in `process_action'
 | /home/vagrant/.rvm/gems/ruby-2.2.4/gems/actionpack-4.2.8/lib/abstract_controller/callbacks.rb:20:in `block in process_action'
 | /home/vagrant/.rvm/gems/ruby-2.2.4/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:117:in `call'
 | /home/vagrant/.rvm/gems/ruby-2.2.4/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:117:in `call'
 | /home/vagrant/.rvm/gems/ruby-2.2.4/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:555:in `block (2 levels) in compile'
 | /home/vagrant/.rvm/gems/ruby-2.2.4/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:505:in `call'
 | /home/vagrant/.rvm/gems/ruby-2.2.4/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:505:in `call'
 | /home/vagrant/.rvm/gems/ruby-2.2.4/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:498:in `block (2 levels) in around'
 | /home/vagrant/.rvm/gems/ruby-2.2.4/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:313:in `call'
 | /home/vagrant/.rvm/gems/ruby-2.2.4/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:313:in `block (2 levels) in halting'
 | /home/vagrant/foreman/app/controllers/api/v2/base_controller.rb:152:in `disable_json_root'

#2 Updated by David Davis about 2 years ago

  • Bugzilla link set to 1458574

#3 Updated by David Davis about 2 years ago

  • Related to Bug #19915: Support importing/exporting package group filters added

#4 Updated by David Davis about 2 years ago

This bug is effectively blocked by #19927 since you'll need to figure out how to handle filter rule uniqueness.

#5 Updated by David Davis about 2 years ago

  • Blocked by Bug #19927: Hammer csv import package rules doesn't handle rules with the same name added

#6 Updated by David Davis about 2 years ago

  • Subject changed from Exporting a content view filter type of erratum says "Include/Exclude unknown" to Support importing/exporting erratum filters

#7 Updated by Thomas McKay 12 months ago

  • Triaged set to Yes

Also available in: Atom PDF