Empty field gets set to 0 when updating bug

Andrew Marold drew at marold.org
Mon Aug 4 15:34:54 UTC 2008


Hi, I'm doing a bunch of customizations to my Bugzilla installation to 
support the way our organization works. To this end I've added a couple 
columns to the bugs tables and the templates. One of them, which is 
meant to track the svn revision number of the bug fix is giving me some 
problems. When I edit a bug if I leave this field empty, it winds up 
getting set to 0. If I set it to some valid valid it gets set properly.

I've painstakingly tracked the source through the debugger, and all is 
fine until the actual call to the db (mysql in this case) to set the 
values. The sql query string looks right, and the @values array has the 
empty string for my value, yet when the newly updated bug is read back 
in to generate activity entries, my field has been set to 0.

I'm kind of at a loss as to where to go next, and would really 
appreciate any suggestions you can offer.

On a related note, where are you supposed to put validators for new 
fields ? I tried putting some code in run_create_validators() but it 
didn't appear to be getting used. This particular field is never set on 
bug creation, only on subsequent updates.

Thanks,
	Drew
-- 
Drew Marold - Drew at marold.org
Perl programmer, bass player, luthier, Gentleman Adventurer
Photography: http://www.flickr.com/photos/unstoppabledrew/

Nothing looks worse on your outdoors resume than a list of the possible
locations of your remains.




More information about the developers mailing list