diff options
| author | mark <mark> | 2011-12-09 18:50:44 +0000 |
|---|---|---|
| committer | mark <mark> | 2011-12-09 18:50:44 +0000 |
| commit | 781e1d52be20355e1e9d57102d6ae44a3f1cbeeb (patch) | |
| tree | 509d1473bd15c7765a9ad19b4ffea22f7f067121 /FS | |
| parent | f5e559bc13ccdd761417e8ef83454f80937799f1 (diff) | |
combine ticket notification scrips, #15353
Diffstat (limited to 'FS')
| -rw-r--r-- | FS/FS/TicketSystem.pm | 8 |
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; } |
