summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Install
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2009-01-15 16:47:35 +0100
committerlpsolit%gmail.com <>2009-01-15 16:47:35 +0100
commit3869f8795096935ca058bb086741c4c7b3d5049a (patch)
treee6dd6e49a09838784d22ad6d14e0236b015c187d /Bugzilla/Install
parentee5cbb72fe58f9fa8c5fad39da67fc078496db94 (diff)
downloadbugzilla-3869f8795096935ca058bb086741c4c7b3d5049a.tar.gz
bugzilla-3869f8795096935ca058bb086741c4c7b3d5049a.tar.xz
Bug 344878: Automatically generate list of acceptable columns for buglist.cgi from the database - Patch by Teemu Mannermaa <wicked@sci.fi> r/a=mkanat
Diffstat (limited to 'Bugzilla/Install')
-rw-r--r--Bugzilla/Install/DB.pm10
1 files changed, 10 insertions, 0 deletions
diff --git a/Bugzilla/Install/DB.pm b/Bugzilla/Install/DB.pm
index b6bda167e..44ad4c814 100644
--- a/Bugzilla/Install/DB.pm
+++ b/Bugzilla/Install/DB.pm
@@ -92,6 +92,16 @@ sub update_fielddefs_definition {
$dbh->bz_add_index('fielddefs', 'fielddefs_value_field_id_idx',
['value_field_id']);
+ # Bug 344878
+ if (!$dbh->bz_column_info('fielddefs', 'buglist')) {
+ $dbh->bz_add_column('fielddefs', 'buglist',
+ {TYPE => 'BOOLEAN', NOTNULL => 1, DEFAULT => 'FALSE'});
+ # Set non-multiselect custom fields as valid buglist fields
+ # Note that default fields will be handled in Field.pm
+ $dbh->do('UPDATE fielddefs SET buglist = 1 WHERE custom = 1 AND type != ' . FIELD_TYPE_MULTI_SELECT);
+ }
+
+
# Remember, this is not the function for adding general table changes.
# That is below. Add new changes to the fielddefs table above this
# comment.