summaryrefslogtreecommitdiff
path: root/FS
diff options
context:
space:
mode:
Diffstat (limited to 'FS')
-rw-r--r--FS/FS/TicketSystem.pm8
1 files changed, 7 insertions, 1 deletions
diff --git a/FS/FS/TicketSystem.pm b/FS/FS/TicketSystem.pm
index aae44f3f5..c1553f17a 100644
--- a/FS/FS/TicketSystem.pm
+++ b/FS/FS/TicketSystem.pm
@@ -136,7 +136,8 @@ sub _upgrade_data {
# Load from RT data file
our (@Groups, @Users, @ACL, @Queues, @ScripActions, @ScripConditions,
- @Templates, @CustomFields, @Scrips, @Attributes, @Initial, @Final);
+ @Templates, @CustomFields, @Scrips, @Attributes, @Initial, @Final,
+ %Delete_Scrips);
my $datafile = '%%%RT_PATH%%%/etc/initialdata';
eval { require $datafile };
if ( $@ ) {
@@ -211,6 +212,11 @@ sub _upgrade_data {
my ($val, $msg) = $item->Delete;
warn "error deleting scrip: $msg\n" if !$val;
}
+ elsif ( exists $Delete_Scrips{$c}{$a}{$t} and $item->Creator == 1 ) {
+ warn "Deleting obsolete scrip $c $a [$t]\n";
+ my ($val, $msg) = $item->Delete;
+ warn "error deleting scrip: $msg\n" if !$val;
+ }
else {
$scrip{$c}{$a}{$t} = $item->id;
}