Bug 1003625 - when exporting "Red Hat Default Report" for organization with ',' in name, columns do not match
Summary: when exporting "Red Hat Default Report" for organization with ',' in name, co...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Subscription Asset Manager
Classification: Retired
Component: Splice
Version: Nightly
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: rc
: ---
Assignee: Splice Developers
QA Contact: mkovacik
URL:
Whiteboard:
Depends On:
Blocks: sam13-tracker 1008504
TreeView+ depends on / blocked
 
Reported: 2013-09-02 14:00 UTC by Jan Hutař
Modified: 2013-10-01 11:23 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1008504 (view as bug list)
Environment:
Last Closed: 2013-10-01 11:23:20 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2013:1390 0 normal SHIPPED_LIVE Release 1.3 of Subscription Asset Manager 2013-10-01 14:43:14 UTC

Description Jan Hutař 2013-09-02 14:00:16 UTC
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 17:19:25 UTC
a2c5343 splice-reports 0.0.9+

Comment 2 Vitaly Kuznetsov 2013-09-13 14:15:46 UTC
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 10:41:00 UTC
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 10:41:35 UTC
Sorry, forgot to mention: used SAM 1.3 snapshot #6 as well.

Comment 5 Vitaly Kuznetsov 2013-09-16 13:16:05 UTC
I would suggest creating new issue for quotes as original one was for commas.

Comment 6 Jan Hutař 2013-09-16 13:45:32 UTC
(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 14:44:00 UTC
(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 11:23:20 UTC
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.