Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.

Bug 1059389

Summary: ResolveModelAttribute function for Subsystems removes leading zero characters
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: Spenser Shumaker <sshumake>
Component: Domain ManagementAssignee: Brian Stansberry <brian.stansberry>
Status: CLOSED NOTABUG QA Contact: Petr Kremensky <pkremens>
Severity: unspecified Docs Contact: Russell Dickenson <rdickens>
Priority: unspecified    
Version: 6.3.0CC: brian.stansberry, emuckenh, fnasser, pgier
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-02-19 19:58:58 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:
Bug Depends On:    
Bug Blocks: 1049648    

Description Spenser Shumaker 2014-01-29 18:34:16 UTC
Description of problem: When using subsystem and calling the method ResolveModelAttribute to retrieve user input, the leading zeros are stripped out of the resulting string.


Version-Release number of selected component (if applicable): 6.3.0


How reproducible:
Always


Steps to Reproduce:
1.When using a subsystem input a string such as "001234" 
2.Retrieve that input from the function ResolveModelAttribute and it will return "1234"

Actual results:
1234

Expected results:
001234

Additional info:

Comment 1 Brian Stansberry 2014-02-18 14:22:45 UTC
This sounds like it should be Component == Domain Management.

Spenser, can you be more specific about what you are seeing?

If you have an attribute specified as ModelType.INT you shouldn't expect it to be stored in the model as a string.

Comment 2 Spenser Shumaker 2014-02-19 16:30:05 UTC
I have the attribute stored as ModelType.STRING

Comment 3 Brian Stansberry 2014-02-19 19:34:54 UTC
Ok, that removes the simple explanation. :) Please point me to the specifics of where this is happening.

Comment 4 Spenser Shumaker 2014-02-19 19:58:58 UTC
This is working as designed.  Putting quotes (""), around the strings fixes any issues of leading 0's being stripped.