Closed Bug 641519 Opened 14 years ago Closed 14 years ago

userAutocomplete is not compatible with Bugzilla configured to use "local" usernames

Categories

(Bugzilla :: Creating/Changing Bugs, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 4.0

People

(Reporter: shadarap, Assigned: shadarap)

Details

Attachments

(1 file, 1 obsolete file)

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: user@address.com did not match anything Expected Results: Bug change successful
Here is the patch I applied to my system to fix the bug.
Assignee: general → create-and-change
Status: UNCONFIRMED → NEW
Component: Bugzilla-General → Creating/Changing Bugs
Ever confirmed: true
Flags: blocking4.0.1+
Target Milestone: --- → Bugzilla 4.0
Version: unspecified → 4.0
Attachment #519155 - Flags: review?(mkanat)
Comment on attachment 519155 [details] [diff] [review] Patch applied to js/field.js to fix bug Ah yes, that looks right! Thank you!! :-)
Attachment #519155 - Flags: review?(mkanat) → review+
Flags: approval4.0+
Flags: approval+
Assignee: create-and-change → shadarap
It would be nice to do some testing with emailsuffix, I think a lot of people use it.
Flags: testcase?
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?
Flags: approval4.0+
Flags: approval+
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.
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).
Attachment #519155 - Attachment is obsolete: true
Comment on attachment 524261 [details] [diff] [review] Patch to apply to js/field.js Looks good to me.
Attachment #524261 - Flags: review+
Flags: approval4.0+
Flags: approval+
(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://lpsolit%40gmail.com@bzr.mozilla.org/bugzilla/trunk/ modified js/field.js Committed revision 7777. Committing to: bzr+ssh://lpsolit%40gmail.com@bzr.mozilla.org/bugzilla/4.0/ modified js/field.js Committed revision 7570.
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: