[freeside-commits] branch FREESIDE_3_BRANCH updated. f12fa1eb90d66448e0e0910bf2770cf5ad2c6199
Mark Wells
mark at 420.am
Thu Jul 18 11:51:26 PDT 2013
The branch, FREESIDE_3_BRANCH has been updated
via f12fa1eb90d66448e0e0910bf2770cf5ad2c6199 (commit)
from 856fe5e70c55f191f29db24c7ca8ae6f952de736 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit f12fa1eb90d66448e0e0910bf2770cf5ad2c6199
Author: Mark Wells <mark at freeside.biz>
Date: Thu Jul 18 11:51:12 2013 -0700
allow changing template on system scrips, #18184
diff --git a/FS/FS/TicketSystem.pm b/FS/FS/TicketSystem.pm
index 96980e9..c1c69fa 100644
--- a/FS/FS/TicketSystem.pm
+++ b/FS/FS/TicketSystem.pm
@@ -209,7 +209,7 @@ sub _upgrade_data {
while (my $item = $search->Next) {
my ($c, $a, $t) = map {lc $item->$_->Name}
('ScripConditionObj', 'ScripActionObj', 'TemplateObj');
- if ( exists $scrip{$c}{$a}{$t} and $item->Creator == 1 ) {
+ if ( exists $scrip{$c}{$a} and $item->Creator == 1 ) {
warn "Deleting duplicate scrip $c $a [$t]\n";
my ($val, $msg) = $item->Delete;
warn "error deleting scrip: $msg\n" if !$val;
@@ -220,7 +220,7 @@ sub _upgrade_data {
warn "error deleting scrip: $msg\n" if !$val;
}
else {
- $scrip{$c}{$a}{$t} = $item->id;
+ $scrip{$c}{$a} = $item->id;
}
}
my $Scrip = RT::Scrip->new($CurrentUser);
@@ -229,8 +229,8 @@ sub _upgrade_data {
my ($c, $a, $t) = map lc,
@{ $s }{'ScripCondition', 'ScripAction', 'Template'};
- if ( exists($scrip{$c}{$a}{$t}) ) {
- $Scrip->Load( $scrip{$c}{$a}{$t} );
+ if ( exists($scrip{$c}{$a}) ) {
+ $Scrip->Load( $scrip{$c}{$a} );
} else { # need to create it
if ( !exists($condition{$c}) ) {
diff --git a/rt/share/html/Admin/Elements/EditScrip b/rt/share/html/Admin/Elements/EditScrip
index 05a33d4..bd1bde7 100755
--- a/rt/share/html/Admin/Elements/EditScrip
+++ b/rt/share/html/Admin/Elements/EditScrip
@@ -108,19 +108,16 @@
&>
<tr><td class="label"><&|/l&>Template</&>:</td><td class="value">\
-% if ( $immutable ) {
-<% $scrip->TemplateObj->Name %>
-<input type="hidden" name="Scrip-<%$id%>-Template" value="<% $scrip->TemplateObj->Id %>">
-% } else {
+%# immutable flag doesn't affect this
<& /Admin/Elements/SelectTemplate,
Name => "Scrip-$id-Template",
Default => $ARGS{"Scrip-$id-Template"} || $scrip->TemplateObj->Id,
Queue => $Queue,
&>
-% }
</td></tr>
<tr><td class="label"><&|/l&>Stage</&>:</td><td class="value">\
+%# or this
<& /Admin/Elements/SelectStage,
Name => "Scrip-$id-Stage",
Default => $ARGS{"Scrip-$id-Stage"} || $scrip->Stage,
-----------------------------------------------------------------------
Summary of changes:
FS/FS/TicketSystem.pm | 8 ++++----
rt/share/html/Admin/Elements/EditScrip | 7 ++-----
2 files changed, 6 insertions(+), 9 deletions(-)
More information about the freeside-commits
mailing list