Fix some upgrade errors
parent
0797f68a84
commit
1453596813
|
@ -1340,15 +1340,14 @@ sub populate_field_definitions
|
|||
}
|
||||
|
||||
# DELETE fields which were added only accidentally, or which
|
||||
# were never tracked in bugs_activity. Note that you should not
|
||||
# delete fields which are used by bugs_activity.
|
||||
# were never (or almost never) tracked in bugs_activity.
|
||||
|
||||
$dbh->do(
|
||||
"DELETE FROM fielddefs WHERE name IN ('cc_accessible', 'requesters.login_name',
|
||||
my $names = "name IN ('cc_accessible', 'requesters.login_name',
|
||||
'attachments.thedata', 'attach_data.thedata', 'content', 'requestees.login_name',
|
||||
'setters.login_name', 'longdescs.isprivate', 'assignee_accessible', 'qacontact_accessible',
|
||||
'commenter', 'owner_idle_time', 'attachments.submitter', 'days_elapsed', 'percentage_complete')"
|
||||
);
|
||||
'commenter', 'owner_idle_time', 'attachments.submitter', 'days_elapsed', 'percentage_complete')";
|
||||
$dbh->do("DELETE FROM bugs_activity WHERE fieldid IN (SELECT id FROM fielddefs WHERE $names)");
|
||||
$dbh->do("DELETE FROM fielddefs WHERE $names");
|
||||
}
|
||||
|
||||
# Get choice value object for a bug or for a hashref with default value names
|
||||
|
|
|
@ -535,9 +535,6 @@ sub update_table_definitions
|
|||
# Make multi select tables to store IDs, not values
|
||||
_convert_multiselects();
|
||||
|
||||
# Add FK to multi select field tables
|
||||
_add_foreign_keys_to_multiselects();
|
||||
|
||||
# 2008-09-07 LpSolit@gmail.com - Bug 452893
|
||||
_fix_illegal_flag_modification_dates();
|
||||
|
||||
|
@ -819,6 +816,9 @@ WHERE description LIKE\'%[CC:%\'');
|
|||
$dbh->bz_alter_column('keywords', 'description');
|
||||
}
|
||||
|
||||
# Add FK to multi select field tables
|
||||
_add_foreign_keys_to_multiselects();
|
||||
|
||||
_move_old_defaults($old_params);
|
||||
|
||||
################################################################
|
||||
|
|
|
@ -97,7 +97,7 @@ my @open_status;
|
|||
my @closed_status;
|
||||
foreach my $status (@{ Bugzilla->get_field('bug_status')->legal_values })
|
||||
{
|
||||
$status->is_open ? push(@open_status, $status->name) : push(@closed_stat, $status->name);
|
||||
$status->is_open ? push(@open_status, $status->name) : push(@closed_status, $status->name);
|
||||
}
|
||||
$vars->{'open_status'} = \@open_status;
|
||||
$vars->{'closed_status'} = \@closed_status;
|
||||
|
|
|
@ -149,7 +149,7 @@ $vars->{allow_edit} = $user->in_group('creategroups');
|
|||
|
||||
unless ($action)
|
||||
{
|
||||
ListGroups($vars, $template);
|
||||
ListGroups($vars);
|
||||
exit;
|
||||
}
|
||||
|
||||
|
@ -278,7 +278,7 @@ if ($action eq 'delete') {
|
|||
Bugzilla::Hook::process('editgroups-post_delete', { group => $group });
|
||||
|
||||
$vars->{'message'} = 'group_deleted';
|
||||
ListGroups($vars, $template);
|
||||
ListGroups($vars);
|
||||
exit;
|
||||
}
|
||||
|
||||
|
@ -351,7 +351,7 @@ if ($action eq 'remove_regexp') {
|
|||
$vars->{'message'} = 'group_membership_removed';
|
||||
$vars->{'group'} = $group->name;
|
||||
|
||||
ListGroups($vars, $template);
|
||||
ListGroups($vars);
|
||||
exit;
|
||||
}
|
||||
|
||||
|
@ -476,14 +476,14 @@ sub _do_remove {
|
|||
|
||||
sub ListGroups
|
||||
{
|
||||
my ($vars, $template) = @_;
|
||||
my ($vars) = @_;
|
||||
my $groups = $vars->{allow_edit}
|
||||
? [ Bugzilla::Group->get_all ]
|
||||
: Bugzilla->user->bless_groups;
|
||||
$vars->{all_groups} = $groups;
|
||||
$vars->{pergroup} = Bugzilla::Group->get_per_group_permissions;
|
||||
|
||||
$template->process("admin/groups/list.html.tmpl", $vars)
|
||||
|| ThrowTemplateError($template->error());
|
||||
Bugzilla->template->process("admin/groups/list.html.tmpl", $vars)
|
||||
|| ThrowTemplateError(Bugzilla->template->error());
|
||||
exit;
|
||||
}
|
||||
|
|
|
@ -1,10 +1,14 @@
|
|||
#!/usr/bin/perl
|
||||
# CustIS Bug 61728 - external SQL interface to Bugzilla's bug tables
|
||||
# External SQL interface to Bugzilla Saved Searches (CustIS Bug 61728)
|
||||
# License: Dual-license GPL 3.0+ or MPL 1.1+
|
||||
# Author(s): Vitaliy Filippov
|
||||
|
||||
# FIXME: Add UI for managing views
|
||||
|
||||
package FlushViews;
|
||||
|
||||
use strict;
|
||||
use Bugzilla::Util;
|
||||
use Bugzilla::User;
|
||||
use Bugzilla::Search;
|
||||
|
||||
|
|
Loading…
Reference in New Issue