Project

General

Profile

Bug #6944

validation error should be raised on creating a discovered repo with blank product name.

Added by Partha Aji about 6 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Web UI
Target version:
Difficulty:
easy
Triaged:
Yes
Bugzilla link:
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1106434
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:

Associated revisions

Revision 37048f87 (diff)
Added by Partha Aji about 6 years ago

Fixes #6944/bz1106434 - Fixed Repodiscovery product validation

Added code in the repo discovery page to validate new product.
Previously product errors like blank name invalid label etc would not
show up on the screen. This commit tries to address that.

Revision 7b6a937f
Added by Partha Aji about 6 years ago

Merge pull request #4531 from parthaa/repo-discovery

Fixes #6944/bz1106434 - Fixed Repodiscovery product validation

History

#1 Updated by The Foreman Bot about 6 years ago

  • Status changed from New to Ready For Testing
  • Target version set to 54
  • Pull request https://github.com/Katello/katello/pull/4531 added
  • Pull request deleted ()

#2 Updated by Eric Helms about 6 years ago

  • Difficulty set to easy

#3 Updated by Eric Helms about 6 years ago

  • Triaged changed from No to Yes

#4 Updated by Partha Aji about 6 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

#5 Updated by Eric Helms about 6 years ago

  • Legacy Backlogs Release (now unused) set to 13

Also available in: Atom PDF