Bug 1106434 - validation error should be raised on creating a discovered repo with blank product name.
Summary: validation error should be raised on creating a discovered repo with blank pr...
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: WebUI
Version: 6.0.3
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: Unspecified
Assignee: Partha Aji
QA Contact: Katello QA List
URL: http://projects.theforeman.org/issues...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-06-09 10:36 UTC by Sachin Ghai
Modified: 2017-02-23 21:16 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-08-13 16:19:36 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
logs from production.log (18.76 KB, text/x-log)
2014-06-09 10:36 UTC, Sachin Ghai
no flags Details
firebug raises NetworkError (78.72 KB, image/png)
2014-06-09 10:39 UTC, Sachin Ghai
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 6944 0 None None None 2016-04-22 16:18:46 UTC

Description Sachin Ghai 2014-06-09 10:36:43 UTC
Created attachment 904604 [details]
logs from production.log

Description of problem:
I was trying repo-discovery in an org where no product was created. 
Repo was successfully discovered from given url but when I clicked on create button without passing new product name, UI didn't throw any validation error. 

Production.log raised an exception with error:

Processing by Katello::Api::V2::ProductsController#create as JSON
  Parameters: {"organization_id"=>"5", "api_version"=>"v2", "product"=>{"organization_id"=>"5"}}
Validation failed: Name cannot be blank, Label can't be blank (ActiveRecord::RecordInvalid)
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/validations.rb:56:in `save!'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/attribute_methods/dirty.rb:33:in `save!'


Version-Release number of selected component (if applicable):
sat6 beta snap8 compose2 (Satellite-6.0.3-RHEL-6-20140605)

How reproducible:
always

Steps to Reproduce:
1.
2.
3.

Actual results:
No error on UI.

Expected results:
The Error message logged in production.log should be raised on UI too.

Validation failed: Name or Label cannot be blank. 
Additional info:

Comment 1 Sachin Ghai 2014-06-09 10:39:02 UTC
Created attachment 904606 [details]
firebug raises NetworkError

Comment 2 RHEL Program Management 2014-06-09 10:54:00 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.

Comment 4 Partha Aji 2014-08-05 19:04:56 UTC
Created redmine issue http://projects.theforeman.org/issues/6944 from this bug

Comment 5 Bryan Kearney 2014-08-12 18:02:45 UTC
Moving to POST since upstream bug http://projects.theforeman.org/issues/6944 has been closed
-------------
Partha Aji
Applied in changeset commit:katello|37048f874db1db590fb07f3490bbee95a69a4827.

Comment 6 Bryan Kearney 2014-08-13 16:19:36 UTC
These bugs have been closed upstream. You will see this in a future release of Satellite 6.


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