P4DTI issue job000352

TitleBugzilla emailsuffix parameter not supported
Statusclosed
Priorityessential
Assigned userNick Barnes
OrganizationRavenbrook
DescriptionBugzilla has a parameter "emailsuffix" which is appended to all email addresses. P4DTI has no support for this, and will fail to translate users correctly if it is set.
AnalysisWe can't easily discover Bugzilla parameters (because they are only stored embedded in perl code in a file in the Bugzilla directory, which may be on another machine from the P4DTI). But we could add a similar parameter to the P4DTI (with no checking that it corresponds).
Best would probably be code which tries to figure out Bugzilla parameters using bugzilla_directory, and a dictionary parameter which overrides that (in case we're remote from the Bugzilla server or we don't read it correctly).
GDR 2001-07-17. We should patch Bugzilla so that it puts its parameters into a table in its database. We should ask the Bugzilla developers to include this patch in their next release: this will be generally useful to anyone integrating with Bugzilla.
GDR 2001-11-14. A better solution that doesn't involve patching Bugzilla would be to notice when Bugzilla e-mail addresses have only a local-part (no "@domain") and then compare with Perforce using only the local-part. This will do the wrong thing in some circumstances, but (a) those are circumstances in which you shouldn't be using "emailsuffix" and (b) you'll get a warning in the startup e-mail.
GDR 2001-11-20. This patch to dt_bugzilla.py is a quick fix for people who need emailsuffix support for P4DTI release 1.2.1.

814c814
< self.bugzilla_user = string.lower(bugzilla_user)
---
> self.bugzilla_user = string.split(string.lower(bugzilla_user),"@")[0]
826c826
< dict[string.lower(user['Email'])] = user['User']
---
> dict[string.lower(user['User'])] = user['User']
How foundcustomer
EvidenceCustomer request: <http://info.ravenbrook.com/mail/2001/07/13/20-09-04/0.txt>
Another: <http://info.ravenbrook.com/mail/2001/11/16/20-03-03/0.txt>
Observed in1.1.1
Introduced in0.5.0
Created byNick Barnes
Created on2001-07-13 21:11:57
Last modified byGareth Rees
Last modified on2001-12-10 19:49:53
History2001-07-13 NB Created.
2001-07-17 GDR Added recommendation.
2001-11-14 GDR Better analysis.
2001-11-20 GDR Added customer request and patch.

Fixes

Change Effect Date User Description
26067 closed 2002-01-24 17:25:31 Gareth Rees Added support for Bugzilla's "emailsuffix" parameter and test case.
Each Bugzilla test case installs its own Bugzilla instance.