[Rt-commit] r16134 - in rt/branches/3.999-DANGEROUS: lib/RT/Model
sunnavy at bestpractical.com
sunnavy at bestpractical.com
Sun Sep 28 04:32:08 EDT 2008
Author: sunnavy
Date: Sun Sep 28 04:32:07 2008
New Revision: 16134
Modified:
rt/branches/3.999-DANGEROUS/ (props changed)
rt/branches/3.999-DANGEROUS/lib/RT/Model/Transaction.pm
Log:
r16933 at sunnavys-mb: sunnavy | 2008-09-28 16:10:52 +0800
told has its own type: told
Modified: rt/branches/3.999-DANGEROUS/lib/RT/Model/Transaction.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/Model/Transaction.pm (original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/Model/Transaction.pm Sun Sep 28 04:32:07 2008
@@ -919,6 +919,26 @@
return ( $self->data );
}
},
+ told => sub {
+ my $self = shift;
+ if ( $self->field eq 'told' ) {
+ my $t1 = RT::Date->new();
+ $t1->set( format => 'ISO', value => $self->new_value );
+ my $t2 = RT::Date->new();
+ $t2->set( format => 'ISO', value => $self->old_value );
+ return _( "%1 changed from %2 to %3", $self->field, $t2->as_string, $t1->as_string );
+ } else {
+ return _(
+ "%1 changed from %2 to %3",
+ $self->field,
+ ( $self->old_value
+ ? "'" . $self->old_value . "'"
+ : _("(no value)")
+ ),
+ "'" . $self->new_value . "'"
+ );
+ }
+ },
set => sub {
my $self = shift;
if ( $self->field eq 'password' ) {
@@ -932,7 +952,7 @@
}
# Write the date/time change at local time:
- elsif ( $self->field =~ /due|starts|started|told/i ) {
+ elsif ( $self->field =~ /due|starts|started/i ) {
my $t1 = RT::Date->new();
$t1->set( format => 'ISO', value => $self->new_value );
my $t2 = RT::Date->new();
More information about the Rt-commit
mailing list