[Rt-commit] r15555 - in rt/branches/3.999-DANGEROUS: lib/RT/ScripAction
sunnavy at bestpractical.com
sunnavy at bestpractical.com
Wed Aug 27 14:02:18 EDT 2008
Author: sunnavy
Date: Wed Aug 27 14:02:15 2008
New Revision: 15555
Modified:
rt/branches/3.999-DANGEROUS/ (props changed)
rt/branches/3.999-DANGEROUS/lib/RT/ScripAction/LinearEscalate.pm
Log:
r16166 at sunnavys-mb: sunnavy | 2008-08-28 01:53:35 +0800
refactor a tiny bit for ScripAction/LinearEscalate.pm, also name fixes
Modified: rt/branches/3.999-DANGEROUS/lib/RT/ScripAction/LinearEscalate.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/ScripAction/LinearEscalate.pm (original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/ScripAction/LinearEscalate.pm Wed Aug 27 14:02:15 2008
@@ -210,7 +210,7 @@
return 1;
}
-sub Commit {
+sub commit {
my $self = shift;
my $new_value = $self->{'new_priority'};
@@ -249,26 +249,26 @@
my ( $val, $msg );
unless ($record) {
unless ($update) {
- ( $val, $msg ) = $ticket->__set(
- Field => 'Priority',
- Value => $new_value,
+ $ticket->__set(
+ column => 'priority',
+ value => $new_value,
);
}
else {
- ( $val, $msg ) = $ticket->_set(
- Field => 'Priority',
- Value => $new_value,
- RecordTransaction => 0,
+ $ticket->_set(
+ column => 'priority',
+ value => $new_value,
+ record_transaction => 0,
);
}
}
else {
- ( $val, $msg ) = $ticket->set_priority($new_value);
+ $ticket->set_priority($new_value);
}
- unless ($val) {
- Jifty->log->error("Couldn't set new priority value: $msg");
- return ( 0, $msg );
+ unless ( $ticket->priority == $new_value ) {
+ Jifty->log->error("Couldn't set new priority value: $new_value");
+ return ( 0 );
}
return 1;
}
More information about the Rt-commit
mailing list