P4DTI issue job000494

TitleBugzilla integration fails if qa_contact is in replicated_fields
Statusclosed
Priorityessential
Assigned userNick Barnes
OrganizationRavenbrook
DescriptionThere is a Bugzilla field "qa_contact", which holds the User name of the "QA contact" assigned to a bug. This may be zero, if the Bugzilla parameter "useqacontact" is turned off, or if there is no QA contact assigned (for instance, if there is no initial QA contact for the component against which this bug is reported). If this field is zero, and the P4DTI is configured to replicate this field to Perforce (i.e. if 'qa_contact' is in replicated_fields in config.py) then the P4DTI will fail.
The failure is reported like this:
2002-04-03 10:34:47 UTC (P4DTI-8647) The replicator failed to poll successfully, because of the following problem:
2002-04-03 10:34:47 UTC (P4DTI-891X) Error (exceptions.KeyError): 0
AnalysisThe user translator must be able to take 0 as a Bugzilla user and translate it to a suitable string for Perforce (e.g. "None"). And vice versa, naturally. However, user 0 should not be allowed to do anything else (e.g. create a bug, change a bug, appear in assigned_to field).
This turned up when doing a lengthy analysis of replicated_fields after job000437.
How foundinspection
Evidencetest_p4dti.py new_p4_job with 'qa_contact' in replicated_fields.
Observed in1.4.0
Introduced in1.2.0
Test proceduretest_p4dti.py new_p4_job with 'qa_contact' in replicated_fields.
Created byNick Barnes
Created on2002-04-03 11:46:54
Last modified byNick Barnes
Last modified on2002-04-09 12:53:22
History2002-04-03 NB Created.

Fixes

Change Effect Date User Description
27822 closed 2002-04-03 14:03:13 Nick Barnes job000494: allow user of 0 for qa_contact, but prohibit it elsewhere.