diff options
author | Ivan Kohler <ivan@freeside.biz> | 2014-02-25 18:34:25 -0800 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2014-03-01 16:26:03 -0800 |
commit | b8988e1d3ac75af63c85e8563e57701030315a9e (patch) | |
tree | db1eb8de0d989314c493de16f1a480cacb0dd57f /rt/etc/upgrade/3.7.19/content | |
parent | 7f029e082712dceafb9152820746da79a50f2275 (diff) |
RT 4.0.19
Diffstat (limited to 'rt/etc/upgrade/3.7.19/content')
-rw-r--r-- | rt/etc/upgrade/3.7.19/content | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/rt/etc/upgrade/3.7.19/content b/rt/etc/upgrade/3.7.19/content index 31ab1c84a..ff43dd053 100644 --- a/rt/etc/upgrade/3.7.19/content +++ b/rt/etc/upgrade/3.7.19/content @@ -24,14 +24,25 @@ sub add_description_to_all_scrips { sub gen_scrip_description { my $scrip = shift; - my $condition = $scrip->ConditionObj->Name + + my $condition; + eval{ + $condition = $scrip->ConditionObj->Name || $scrip->ConditionObj->Description - || ('On Condition #'. $scrip->Condition); + || ('On Condition #'. $scrip->Condition); + }; + + if ($@){ + print STDERR $@; + print STDERR "Reference to missing scrip condition found. If you have ScripCondition = 0 in the Scrips table, update with a real condition number.\n"; + $condition = 'On undefined Condition # 0'; + } + my $action = $scrip->ActionObj->Name || $scrip->ActionObj->Description || ('Run Action #'. $scrip->Action); return join ' ', $condition, $action; -} + } } 1; |