|Title||Bugzilla integration doesn't treat "numeric" fields well|
|Assigned user||Nick Barnes|
|Description||The Bugzilla integration allows the replication of some relatively obscure fields in Bugzilla bugs. Several of these fields have integer types in the MySQL database, so the Bugzilla integration treats them as numbers (with 'word' type in the Perforce jobspec and an integer translator). However, most of these fields are actually boolean ('everconfirmed', 'qacontact_accessible', 'cclist_accessible', 'assignee_accessible', 'reporter_accessible'), and one is a bitset ('groupset'). Only one is actually an integer ('votes'). So if these fields are replicated, their values don't get represented very intelligibly in Perforce jobs.|
The P4DTI doesn't allow the user to modify some of these fields in Perforce ('votes', 'groupset', 'everconfirmed'), but a user could conceivably modify one of the others to a value which is not sensible in Bugzilla (i.e. anything other than 0 or 1). That's what makes this "essential" rather than "optional" or "nice".
|Analysis||For bool types: add a boolean translator to dt_bugzilla.py (0 -> 'No', 1 -> 'Yes', and vice versa). Make the type-discovery code in bugzilla.py aware of these special fields, and add a 'bool' type (alongside 'int', 'timestamp', etc) in the type information passed to configure_bugzilla.py. On the Perforce side, make a bool into a suitable select ('No','Yes') with suitable default and a suitable translator.|
For groupset: make a special groupset translator which provides the actual group names in some sort of string. We don't necessarily have to be able to parse this, because groupset is readonly, but we might want to revisit that in the future. Note that groupset is not going to be a bitset forever; this is one of the things under development for Bugzilla 2.18.
|Evidence||test_p4dti.py new_p4_job with the numeric fields in replicated_fields, then inspect the jobspec.|
|Created by||Nick Barnes|
|Created on||2002-04-04 11:20:36|
|Last modified by||Nick Barnes|
|Last modified on||2018-07-05 17:28:02|
|History||2002-04-04 NB Created.|
2018-07-05 NB Suspended because the P4DTI is obsolete.