User-Agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:2.0b11) Gecko/20100101 Firefox/4.0b11 Build Identifier: 4.0.0 Having bugzilla configured to use local usernames implies that the user accounts created have a username without an email suffix (such as @hotmail.com) Following recommendations, our company uses the following settings to achieve this configuration: Administration > Parameters > User Authentication: emailregexp = ^[^@]+ emailsuffix = @ourcompanydomain.ca createemailregexp = .* Now when using any field which makes use of the "userAutocomplete" functionality, the full username + email suffix is returned when a user is selected from the resulting list. Next when one attempts to "Save Changes" an error is returned something like: "Assignee: username@companyDomain.ca did not match anything" In the code there are two values used, "email" and "real_name", the first of which is used on selection. I recommend that "email" be replaced with "name". "name" will actually return an email address if bugzilla uses the default configuration, where-as "name" will return the correct username as well if bugzilla is setup to use local usernames. I will attach a patch in a following post Reproducible: Always Steps to Reproduce: 1. Configure bugzilla to use local usernames 2. Fill out a userAutocomplete field in some random Bug (such as changing Assignee, QA Contact, or appending a user to the CC list) 3. Attempt to "Save Changes" Actual Results: Assignee/QA Contact: firstname.lastname@example.org did not match anything Expected Results: Bug change successful
Created attachment 519155 [details] [diff] [review] Patch applied to js/field.js to fix bug Here is the patch I applied to my system to fix the bug.
Comment on attachment 519155 [details] [diff] [review] Patch applied to js/field.js to fix bug Ah yes, that looks right! Thank you!! :-)
It would be nice to do some testing with emailsuffix, I think a lot of people use it.
This patch doesn't apply cleanly, neither on trunk nor on the 4.0 branch, probably due to bug 619637: Hunk #3 FAILED at 693. Updated patch needed.
Hey Randy. Could we get a patch that applies to the trunk?
Max and Frédéric, sorry I have been super busy at work (others were laid off), I will work on uploading a new patch for the trunk tomorrow.
(In reply to comment #6) > Max and Frédéric, sorry I have been super busy at work (others were laid off), > I will work on uploading a new patch for the trunk tomorrow. Sounds great, thanks! No problem on the delay, I totally understand.
Created attachment 524261 [details] [diff] [review] Patch to apply to js/field.js Here is the new patch that should work with the trunk. Note: I have not done any testing of this yet. If I have time I will try to later today. The patch should work on the trunk as of today. P.S. I have never worked with Bazaar before, I should look into this a bit more, seems like a nice tool (from what I have used checking out the trunk).
Comment on attachment 524261 [details] [diff] [review] Patch to apply to js/field.js Looks good to me.
(In reply to comment #8) > P.S. I have never worked with Bazaar before, I should look into this a bit > more, seems like a nice tool (from what I have used checking out the trunk). Cool! Yeah, it's my favorite distributed version control system out of all of them.
Committing to: bzr+ssh://email@example.com/bugzilla/trunk/ modified js/field.js Committed revision 7777. Committing to: bzr+ssh://firstname.lastname@example.org/bugzilla/4.0/ modified js/field.js Committed revision 7570.