[Rt-commit] [svn] r1107 - rt/branches/rt-3.1/lib/RT

alexmv at pallas.eruditorum.org alexmv at pallas.eruditorum.org
Thu Jun 17 20:13:46 EDT 2004


Author: alexmv
Date: Thu Jun 17 20:13:46 2004
New Revision: 1107

Modified:
   rt/branches/rt-3.1/lib/RT/Record.pm
Log:
RT-Ticket: 5753
RT-Status: resolved
RT-Update: correspond

 * RT::Record objects are not always tickets; do introspection to find
   out what kind of object we're updating, and use that to generate
   the log message


Modified: rt/branches/rt-3.1/lib/RT/Record.pm
==============================================================================
--- rt/branches/rt-3.1/lib/RT/Record.pm	(original)
+++ rt/branches/rt-3.1/lib/RT/Record.pm	Thu Jun 17 20:13:46 2004
@@ -733,7 +733,8 @@
               my $method = "Set$attribute";
               my ( $code, $msg ) = $self->$method($value);
 
-              push @results, $self->loc("Ticket [_1]", $self->id) . ': ' . $self->loc($attribute) . ': ' . $self->CurrentUser->loc_fuzzy($msg);
+	      my($prefix) = ref($self) =~ /RT::(\w+)/;
+	      push @results,  $self->loc("$prefix [_1]", $self->id) . ': ' . $self->loc($attribute) . ': ' . $self->CurrentUser->loc_fuzzy($msg);
 =for loc
                                    "[_1] could not be set to [_2].",       # loc
                                    "That is already the current value",    # loc


More information about the Rt-commit mailing list