Bug #19927
closed
Hammer csv import package rules doesn't handle rules with the same name
Added by David Davis almost 8 years ago.
Updated almost 8 years ago.
Category:
content-view-filters
|
Description
Steps to reproduce:
1. Create a content view with a package filter
2. Create two rules on this filter with the same name (e.g. exclude vim version > 3.0 and vim version = 3.0)
3. Export your filters
4. Remove the filters
5. Do an import
Expected results:
Your filter should have two rules (e.g. exclude vim version > 3.0 and vim version = 3.0)
Actual result:
Your filter only has one rule, the second one (e.g. vim version = 3.0).
The problem is that name isn’t unique across filter rules but hammer csv assumes it is:
https://git.io/vHVBG
https://git.io/vHVBE
Related issues
1 (1 open — 0 closed)
- Blocks Bug #19724: Support importing/exporting erratum filters added
- Subject changed from Hammer package filter rules doesn't handle rules with the same name to Hammer csv import package rules doesn't handle rules with the same name
- Bugzilla link set to 1458843
Just an FYI... Note that many/all of the csv files expect that names are unique and don't use labels typically. Perhaps an additional column should be added for label and then use that first, falling back to name column.
Your idea is good but not really applicable. Content view rules don't have labels. This makes updating them hard.
Talking this over with @jsherrill, I think when importing (or updating) existing filters, it might make sense to drop all its rules and then re-add the ones from the csv.
- Pull request https://github.com/Katello/hammer-cli-csv/pull/157 added
- Status changed from New to Closed
Also available in: Atom
PDF