Bug 801207

Summary: Wrong messages when typing into input fields.
Product: [JBoss] JBoss Enterprise Portal Platform 5 Reporter: vramik
Component: PortalAssignee: Thomas Heute <theute>
Status: VERIFIED --- QA Contact:
Severity: high Docs Contact:
Priority: unspecified    
Version: 5.2.1.ER01CC: epp-bugs, theute
Target Milestone: ---   
Target Release: 5.2.1.ER02   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
username01
none
username02
none
groupName
none
usernameInGroupMan none

Description vramik 2012-03-07 22:58:57 UTC
Created attachment 568446 [details]
username01

Description of problem:
1. User Name in New Staff:
a) when type user name with first letter capital, message "The "User Name" field must start with a character" occur (attachment username01.png)
b) when type user name with invalid characters, message looks like "msg msg Ivalid-char Invalid-char" (attachment username02.png)

2. Group Name when adding new group in Users and Groups Management:
When type invalid characters, warning contains message too many times (groupName.png)

(3. User Name field when putting user into Group:
When typing "a*****", message says User "a*****" doesn't exist. I'm not sure if better message is warning that says username contains invalid characters. (usernameInGroupMan.png))

Comment 1 vramik 2012-03-07 22:59:29 UTC
Created attachment 568447 [details]
username02

Comment 2 vramik 2012-03-07 23:00:04 UTC
Created attachment 568448 [details]
groupName

Comment 3 vramik 2012-03-07 23:01:05 UTC
Created attachment 568449 [details]
usernameInGroupMan

Comment 4 claprun@redhat.com 2012-03-13 17:41:41 UTC
The problem comes from the error message for the first issue. It needs to be localized properly, I can fix the en and fr versions.
Still looking at the other issues.

Comment 5 claprun@redhat.com 2012-03-13 18:02:14 UTC
Looking at the code, it looks like the new version of the validation is more permissive (allows different case apart from the initial character which must be lowercase) than what was previously allowed (only lowercase letters). So I first need to go back to the original behavior (post 5.1, I think).
Also, the error messages are currently wrong with respect to what's being done in the code. The English version is incorrect and the French version also. Also, not only are the fr and en versions incorrect but they also contradict one another so localized versions of the error messages would need to be checked for error and coherence between versions.

Comment 6 claprun@redhat.com 2012-03-13 18:26:12 UTC
For the second part, part of the issue is how messages errors are now handled (validation now goes through fully instead of failing fast which means you can now see all the errors at once instead of trying 20 times to get the format right). I will fix the reporting so that it doesn't report the same error several times. The other part of the problem is resource resolving: the localization keys are not properly resolved for a reason unknown to me at the moment. Will look at it later.

Comment 7 claprun@redhat.com 2012-03-14 15:45:12 UTC
I have fixed all issues except for the 3rd one, which comes directly from eXo: it wasn't working before my change and it's not working now. The problem is that usernames when they are put into a group are validated via a regular expression which does allow a username such as a*****. This results in the validator moving on and accepting the username as valid and thus, looking for it at a later validation stage.

Comment 8 JBoss JIRA Server 2012-03-14 15:54:10 UTC
Chris Laprun <chris.laprun> made a comment on jira GTNPORTAL-2378

The problem is that usernames when they are put into a group are validated via a regular
expression which does allow a username such as a*****. This results in the
validator moving on and accepting the username as valid and thus, looking for
it at a later validation stage.

Comment 9 JBoss JIRA Server 2012-03-14 17:30:26 UTC
Chris Laprun <chris.laprun> updated the status of jira GTNPORTAL-2378 to Resolved

Comment 10 JBoss JIRA Server 2012-03-14 17:30:40 UTC
Chris Laprun <chris.laprun> updated the status of jira GTNPORTAL-2377 to Resolved

Comment 11 claprun@redhat.com 2012-03-14 17:33:03 UTC
Should be done now, please check.