Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 915510

Summary: Exception is thrown when trying to update System Name greater than 255 Characters
Product: [Retired] Subscription Asset Manager Reporter: sthirugn <sthirugn>
Component: katelloAssignee: Bryan Kearney <bkearney>
Status: CLOSED CURRENTRELEASE QA Contact: SAM QE List <sam-qe-list>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 1.3CC: bkearney, omaciel, tomckay
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-06-27 21:02:37 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 971511    
Attachments:
Description Flags
Exception when System Name is greater than 255 characters none

Description sthirugn@redhat.com 2013-02-25 22:54:57 UTC
Created attachment 702549 [details]
Exception when System Name is greater than 255 characters

Description of problem:
Exception is thrown when trying to update the Name of the Subscribed system with more than 255 characters

Version-Release number of selected component (if applicable):
* candlepin-0.7.23-1.el6_3.noarch
* candlepin-cert-consumer-cloud-qe-9.idm.lab.bos.redhat.com-1.0-1.noarch
* candlepin-tomcat6-0.7.23-1.el6_3.noarch
* elasticsearch-0.19.9-5.el6_3.noarch
* katello-candlepin-cert-key-pair-1.0-1.noarch
* katello-certs-tools-1.2.1-1h.el6_3.noarch
* katello-cli-1.2.1-12h.el6_3.noarch
* katello-cli-common-1.2.1-12h.el6_3.noarch
* katello-common-1.2.1-15h.el6_3.noarch
* katello-configure-1.2.3-3h.el6_3.noarch
* katello-glue-candlepin-1.2.1-15h.el6_3.noarch
* katello-headpin-1.2.1-15h.el6_3.noarch
* katello-headpin-all-1.2.1-15h.el6_3.noarch
* katello-selinux-1.2.1-2h.el6_3.noarch
* thumbslug-0.0.28-1.el6_3.noarch
* thumbslug-selinux-0.0.28-1.el6_3.noarch

How reproducible:
Always

Steps to Reproduce:
1. Log in to SAM
2. Navigate to Systems page and click on a System
3. Go to Details Tab -> System Info -> Click to edit System Name under System Properties
4. Update Name with a text more than 255 characters:
test.domain.test.domain.test.domain.test.domain.test.domain.test.domain.test.domain.test.domain.test.domain.test.domain.test.domain.test.domain.test.domain.test.domain.test.domain.test.domain.test.domain.test.domain.test.domain.test.domain.test.domain.test.domain
  
Actual results:
Exception is thrown (see attached screenshot)

Expected results:
Error message saying System Name cannot be greater than 255 characters:
"System Name cannot contain more than 255 characters"

Additional info:
1.Other editable fields in this page - Description and Location show proper error message in this scenario.
2.System Name is properly updated with a text equal to 255 characters.

Comment 1 Tom McKay 2013-07-22 16:45:23 UTC
Name is validated but displayed message is slightly confusing:

Validation Failed:
Name is too long (maximum is 250 characters)
Name cannot contain more than 255 characters

Two differing validations?

Comment 2 Payal Godhani 2013-08-02 18:18:44 UTC
https://github.com/Katello/katello/pull/2717

Comment 4 Bryan Kearney 2013-08-14 19:23:34 UTC
Will be in 1.4.3-9-sat or later.

Comment 5 sthirugn@redhat.com 2013-08-20 21:26:18 UTC
Failed.

Currently seeing the same messages as mentioned in Comment 1 above.  This needs to be fixed to show a clear error message to the user.

Validation Failed:
    Name is too long (maximum is 250 characters)
    Name cannot contain more than 255 characters

Version Tested:
* candlepin-0.8.20-1.el6sam.noarch
* candlepin-cert-consumer-cloud-qe-21.idm.lab.bos.redhat.com-1.0-1.noarch
* candlepin-scl-1-5.el6_4.noarch
* candlepin-scl-quartz-2.1.5-5.el6_4.noarch
* candlepin-scl-rhino-1.7R3-1.el6_4.noarch
* candlepin-scl-runtime-1-5.el6_4.noarch
* candlepin-selinux-0.8.20-1.el6sam.noarch
* candlepin-tomcat6-0.8.20-1.el6sam.noarch
* elasticsearch-0.19.9-8.el6sat.noarch
* katello-candlepin-cert-key-pair-1.0-1.noarch
* katello-certs-tools-1.4.2-2.el6sat.noarch
* katello-cli-1.4.3-7.el6sat.noarch
* katello-cli-common-1.4.3-7.el6sat.noarch
* katello-common-1.4.3-8.el6sam_splice.noarch
* katello-configure-1.4.4-2.el6sat.noarch
* katello-glue-candlepin-1.4.3-8.el6sam_splice.noarch
* katello-glue-elasticsearch-1.4.3-8.el6sam_splice.noarch
* katello-headpin-1.4.3-8.el6sam_splice.noarch
* katello-headpin-all-1.4.3-8.el6sam_splice.noarch
* katello-selinux-1.4.4-2.el6sat.noarch
* thumbslug-0.0.32-1.el6sam.noarch
* thumbslug-selinux-0.0.32-1.el6sam.noarch

Comment 7 sthirugn@redhat.com 2014-06-27 21:02:37 UTC
This works fine in SAM 1.4.

Now the following UI message is displayed:
Validation Failed:
    Name cannot contain more than 255 characters