Commit d8000a59 authored by mkanat%kerio.com's avatar mkanat%kerio.com

Bug 299848: enter_bug's automatic OS/Platform code does not work with the new default OS list

Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=wurblzap, a=justdave
parent 74dd48c2
......@@ -204,7 +204,7 @@ sub UpdateParams {
$param{'defaultplatform'} = 'Other';
}
if (!exists $param{'defaultopsys'}) {
$param{'defaultopsys'} = 'other';
$param{'defaultopsys'} = 'Other';
}
}
delete $param{'usebrowserinfo'};
......
......@@ -3991,6 +3991,26 @@ if (!exists $dbh->bz_column_info('milestones', 'sortkey')->{DEFAULT}) {
# when all bug fields have been correctly set.
$dbh->bz_alter_column('bugs', 'creation_ts', {TYPE => 'DATETIME'});
# Old Bugzillas have "other" as an OS choice, new ones have "Other"
# (capital O).
# XXX - This should be moved inside of a later schema change, once
# we have one to move it to the inside of.
print "Setting any 'other' op_sys to 'Other'...\n";
$dbh->do('UPDATE op_sys SET value = ? WHERE value = ?',
undef, "Other", "other");
$dbh->do('UPDATE bugs SET op_sys = ? WHERE op_sys = ?',
undef, "Other", "other");
if (Param('defaultopsys') eq 'other') {
# We can't actually fix the param here, because WriteParams() will
# make $datadir/params unwriteable to the webservergroup.
# It's too much of an ugly hack to copy the permission-fixing code
# down to here. (It would create more potential future bugs than
# it would solve problems.)
print "WARNING: Your 'defaultopsys' param is set to 'other', but"
. " Bugzilla now\n"
. " uses 'Other' (capital O).\n";
}
# If you had to change the --TABLE-- definition in any way, then add your
# differential change code *** A B O V E *** this comment.
#
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment