Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 166555

Summary: Bugs with QA contacts cannot be updated when using "local users"
Product: z_Archived Reporter: Dennis Ballance <dwballance>
Component: MylynAssignee: Robert Elves <robert.elves>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: eric.woodruff+eclipse
Version: unspecified   
Target Milestone: 2.0 M1   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
mylar/context/zip none

Description Dennis Ballance CLA 2006-12-01 15:39:59 EST
Build ID: M20060629-1905

Steps To Reproduce:
1. Configure Bugzilla to allow local users (emailregexp = ^[^@]+$ and emailsuffix=@mydomain.com]
2. Configure Bugzilla to support QA contacts
3. Create a bug with an assigned QA contact
4. Retrieve that bug within Mylar.
5. Add a comment and submit.

The resulting error page will say:

Bugzilla was unable to make any match at all for one or more of the names and/or email addresses you entered on the previous page.
  Please go back and try other names or email addresses.  
  QA Contact:  yourqaguy@mydomain.com did not match anything...


More information:
It appears that the Mylar form is identifying the QA field, and making it a hidden field on the form that is posted back. Curiously, our Bugzilla is also set to show the users in a dropdown list (rather than an edit box), so the "value" of the selected item is the name without email extension. It appears Mylar is figuring out the email name from the qa_contact select box, then adding the domain onto it.

Since QA cannot be edited in Mylar, what if that field was not posted back to the server? Or, can Mylar be configured to not append the domain?

[PS - recently discovered Mylar, it is way cool - nice work.]
Comment 1 Robert Elves CLA 2006-12-01 18:24:51 EST
*** Bug 166553 has been marked as a duplicate of this bug. ***
Comment 2 Robert Elves CLA 2006-12-01 18:26:20 EST
From bug#166553:
If Bugzilla is configured to only accept user names, using Mylar to update a bug will fail unless the @somedomain.tld is removed from the end of the QA Contact field. This is because viewing the details of a bug using the ctype=xml will return the full email address rather than the user name that Bugzilla requires in a POST. There should be a configuration preference to remove the @somedomain.tld from the QA Contact that is returned in the xml to allow bug comments to be submitted successfully.
Comment 3 Dennis Ballance CLA 2006-12-01 18:34:26 EST
I'm assuming that Bugzilla expects data extracted via ctype=xml to be used for read-only purposes, hence it delivers the fully-qualified email addr. Is that a fix that I could inject into my copy of Mylar until it's added to the main codebase, or am I out of luck until this bug is resolved? ("Out of luck" just means I have to use the browser tab instead of the Task tab to add comments, so it's not really *that* big of a deal.)
Comment 4 Robert Elves CLA 2006-12-01 19:20:27 EST
You could try adding BugzillaReportElement.REPORTER.getKeyString()  to the list of fields skipped in to BugzillaClient.getPairsForExisting..... That said I intend to look at this next week (ideally I'll have a fix for 1.0).
Comment 5 Robert Elves CLA 2006-12-01 19:21:52 EST
Oops, that is  you could try adding BugzillaReportElement.QA_CONTACT.getKeyString().
Comment 6 Robert Elves CLA 2006-12-07 16:04:08 EST
Deferring. Will bump up priority so it gets attention right away post 1.0.
Comment 7 Mik Kersten CLA 2007-01-23 16:56:37 EST
Dennis: are you considering submitting a patch for this?  That would be the quickest way of getting this into a 2.0 release.  If so, refer to the following page for getting your workspace set up for Mylar patches: http://wiki.eclipse.org/index.php/Mylar_Contributor_Reference
Comment 8 Dennis Ballance CLA 2007-01-23 17:06:15 EST
I don't have plans to submit a patch -- unfortunately, I'm not a java developer, so it's a pretty significant process for me to get something patch-worthy going. I actually disabled QA on our system until this gets resolved...sorry I'm not much more help right now.
Comment 9 Mik Kersten CLA 2007-01-23 17:12:44 EST
Rob: I'm not sure how many people this is blocking, so just prioritize accordingly.

Dennis: please consider adding your current work-around to: http://wiki.eclipse.org/index.php/Mylar_FAQ#Bugzilla_Connector  You just need to log in with to edit the wiki via your Bugzilla username and password.
Comment 10 Robert Elves CLA 2007-01-23 18:09:56 EST
My concern is that this may be blocking a number of people so would like to at least have a work around in place for 2.0.  Perhaps just a setting on the repository configuration page.
Comment 11 Dennis Ballance CLA 2007-01-24 12:54:34 EST
Hmm...my "workaround" was to turn off the QA feature in Bugzilla. For users wanting/needing to use that (I would prefer to but it's not essential for our workflow) it's not really an option. Do you still think I should post it?
Comment 12 Mik Kersten CLA 2007-01-24 20:16:14 EST
Yes, it is worth posting since it worked for you, and since some people have their own Bugzilla installs and could end up doing the same thing.  Just link to this bug by pasting in: see  [https://bugs.eclipse.org/bugs/show_bug.cgi?id=166555 bug 166555)

So Rob, should you consider this for 2.0M1?
Comment 13 Robert Elves CLA 2007-02-07 18:25:10 EST
Update: The QA Contact field presents us with a number of hurdles. We have no way to determine if QA Contact is enabled on the server. For this reason I've enabled the QA Contact field so that it appears in the editor by default.  This way the field is available for those using this field in standard (full email address) mode.  However, even if QA Contact is disable on the server the field will be available in the task editor. If a user enters 'invalid' information in this field it will result in an error response from the bugzilla server (apparently the field is still validated even when disabled??).

For the case where short logins is enabled, one potential (and regrettable) solution could be to make truncation of the address a setting on the Bugzilla repository configuration page. If this turns out to be our only option then so be it.

In the near future we hope to make more use of the new RPC based interface to bugzilla (bug#154785).  I haven't had time to do any testing with this new interface but hope to soon. It is possible that this interface will not have the same issues we face when using the xml dump. That said the rpc interface will only be available upon the next release and would require you upgrading to this version.
Comment 14 Dennis Ballance CLA 2007-02-07 23:44:17 EST
Thanks for the update. I added my workaround to the wiki.
Comment 15 Robert Elves CLA 2007-02-16 15:28:37 EST
Fixed for M1 (available tonight). There is now a "Local users enabled:" check box on the Bugzilla repository settings page. Enable this and only the username will be sent in the QA field rather then the entire address. I've tested here and it resolves the commit problem.  Marking resolved but please confirm or re-open if this is not fix for your configuration.
Comment 16 Robert Elves CLA 2007-02-16 15:30:35 EST
Created attachment 59195 [details]
mylar/context/zip