Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Trying to import an organization, when there is an existing organization with the same name, fails with
Caught NoMethodError:undefined method `first' for nil:NilClass while processing following line:
{"organization"=>"Richlands", "organization_id"=>"2000"}
The problem (I think) is in base.rb
rescue RestClient::UnprocessableEntity => ue
error " Creation of #{to_singular(entity_type)} failed."
errs = JSON.parse(ue.response)['errors']
uniq = errs.first[0] if errs.first[1].is_a?(Array) && errs.first[1][0] =~ /must be unique/
If 'errs' is nil, the uniq= fails.
To reproduce:
1) Export orgs from Sat5, containing some org, "Foo"
2) In Sat6, create Foo via webui
3) hammer import organization --csv-file /users/csv/containing/Foo
4) Boom.
Need to fix for GA - running into already-named orgs is not unlikely, we need to respond more responsibly
Comment 1RHEL Program Management
2014-08-26 14:53:35 UTC
Since this issue was entered in Red Hat Bugzilla, the release flag has been
set to ? to ensure that it is properly evaluated for this release.
(In reply to Tomas Lestach from comment #3)
> "organization_id"=>"2000" ?
> Man, you really created 2000 organizations on your Sat5? :-)
Hand-edited so that I could use davido's export without the org-ids colliding with the ones I already had in my Sat6 instance :)
Trying to import an organization, when there is an existing organization with the same name, fails with Caught NoMethodError:undefined method `first' for nil:NilClass while processing following line: {"organization"=>"Richlands", "organization_id"=>"2000"} The problem (I think) is in base.rb rescue RestClient::UnprocessableEntity => ue error " Creation of #{to_singular(entity_type)} failed." errs = JSON.parse(ue.response)['errors'] uniq = errs.first[0] if errs.first[1].is_a?(Array) && errs.first[1][0] =~ /must be unique/ If 'errs' is nil, the uniq= fails. To reproduce: 1) Export orgs from Sat5, containing some org, "Foo" 2) In Sat6, create Foo via webui 3) hammer import organization --csv-file /users/csv/containing/Foo 4) Boom. Need to fix for GA - running into already-named orgs is not unlikely, we need to respond more responsibly