Bug 1003625 - when exporting "Red Hat Default Report" for organization with ',' in name, columns do not match
when exporting "Red Hat Default Report" for organization with ',' in name, co...
Status: CLOSED ERRATA
Product: Subscription Asset Manager
Classification: Red Hat
Component: Splice (Show other bugs)
Nightly
Unspecified Unspecified
unspecified Severity medium
: rc
: ---
Assigned To: Splice Developers
mkovacik
:
Depends On:
Blocks: sam13-tracker 1008504
  Show dependency treegraph
 
Reported: 2013-09-02 10:00 EDT by Jan Hutař
Modified: 2013-10-01 07:23 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1008504 (view as bug list)
Environment:
Last Closed: 2013-10-01 07:23:20 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jan Hutař 2013-09-02 10:00:16 EDT
Description of problem:
I have organization "Red Hat, Inc." synced from Satellite 5.6.0 through Splice and when I attempt to read export.csv from report "Red Hat Default Report", columns are broken.


Version-Release number of selected component (if applicable):
SAM 1.3 snapshot #4
ruby193-rubygem-splice_reports-0.0.8-1.el6sam.noarch
katello-glue-elasticsearch-1.4.3-11.el6sam_splice.noarch
spacewalk-splice-tool-0.40-1.el6sam.noarch
katello-common-1.4.3-11.el6sam_splice.noarch
katello-headpin-1.4.3-11.el6sam_splice.noarch
splice-common-config-0.144-1.el6sam.noarch
splice-selinux-0.144-1.el6sam.noarch
splice-common-0.144-1.el6sam.noarch
ruby193-rubygem-splice_reports-0.0.8-1.el6sam.noarch
katello-headpin-all-1.4.3-11.el6sam_splice.noarch
katello-glue-candlepin-1.4.3-11.el6sam_splice.noarch
splice-0.144-1.el6sam.noarch


How reproducible:
always


Steps to Reproduce:
1. Have Satellite 5.6.0 with NULL organization named "Red Hat, Inc."
2. Use Splice to sync it to SAM 1.3
3. Use webUI to download archive with the export:
   Administer -> Red Hat Default Report -> Export Report
4. Look at the report's export.csv in the LibreOffice


Actual results:
Last 2 columns are moved, incorrect data in it. This is caused by incorrect escaping of strings - looking into export.csv:
[...]ibm-x3655-02.ovirt.rhts.eng.bos.redhat.com, Red Hat, Inc., Active, 


Expected results:
[...]ibm-x3655-02.ovirt.rhts.eng.bos.redhat.com,"Red Hat, Inc.", Active,
Comment 1 Chris Duryee 2013-09-03 13:19:25 EDT
a2c5343 splice-reports 0.0.9+
Comment 2 Vitaly Kuznetsov 2013-09-13 10:15:46 EDT
Verified with Snapshot6:

_id, record, CHECK-IN TIME, STATUS, DB ID, SATELLITE SERVER, SYSTEM ID, HOSTNAME, ORGANIZATION, LIFECYCLE STATE, 
{"ident"=>"dc0ded5d-2d17-4a43-a0a8-64e6fdbb3510"}, 52331d5b6aa5b46818000003, 2013-09-13T06:02:12Z, "Invalid", "dc0ded5d-2d17-4a43-a0a8-64e6fdbb3510", "ec2-54-216-163-158.eu-west-1.compute.amazonaws.com", 1000010000, "ip-10-64-147-151.eu-west-1.compute.internal", "Testing, Org", "Active",

fields are enquoted now.
Comment 3 Jan Hutař 2013-09-16 06:41:00 EDT
FAILS_QA

Please try with system named like:

"ahoj"

(including these quotes). You will get CSV file like:

{"ident"=>"27c33d36-0599-4220-9b27-3207f418a2db"}, 5236de8841905d6c59000006, 2013-09-16T10:31:43Z, "Current", "27c33d36-0599-4220-9b27-3207f418a2db", "ibm-x3650m4-03-vm08.lab.eng.brq.redhat.com", 1000010001, ""ahoj"", "Red Hat, Inc.", "Active", 

So columns do not match again. Now there is one column less in LibreOffice.
Comment 4 Jan Hutař 2013-09-16 06:41:35 EDT
Sorry, forgot to mention: used SAM 1.3 snapshot #6 as well.
Comment 5 Vitaly Kuznetsov 2013-09-16 09:16:05 EDT
I would suggest creating new issue for quotes as original one was for commas.
Comment 6 Jan Hutař 2013-09-16 09:45:32 EDT
(In reply to Vitaly Kuznetsov from comment #5)
> I would suggest creating new issue for quotes as original one was for commas.

Sure, cloned to bug 1008504.
Comment 7 Vitaly Kuznetsov 2013-09-16 10:44:00 EDT
(In reply to Jan Hutař from comment #6)
> (In reply to Vitaly Kuznetsov from comment #5)
> > I would suggest creating new issue for quotes as original one was for commas.
> 
> Sure, cloned to bug 1008504.

Thanks! Setting this one to 'Verified' then (names with commas work).
Comment 9 errata-xmlrpc 2013-10-01 07:23:20 EDT
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHEA-2013-1390.html

Note You need to log in before you can comment on or make changes to this bug.