Hi,
We are using Request Tracker 4.07 with an external SAML authentication
solution. As a result, our user’s unique username is replaced by something
inhuman like 131145345@sub.something.com.
When a user updates a ticket (e.g. reply) the default messagebox shows
something like:
body text
Since a user is not really familiar with “1311345@sub.something.com” (this
is a identifier from our SAML solution, not known by users) I would rather
have something like the users e-mail address, not the username, e.g.:
body text
How can I customize this (or something similar) the proper way, without
“hacking” Request Trackers code (and run into problems when upgrading)?
We recently extracted code that adds that line into a very small
method especially to allow people to override how that line is
generated. You need QuoteHeader method in lib/RT/Transaction.pm.
Quoting commit that added it:
commit e6cfc69c40da44fa367e1e7dad0deeae909819ac
Author: Ruslan Zakirov ruz@bestpractical.com
extract Transaction->QuoteHeader method
Code that is adding "On <date> <person> wrote:" in front of
quoted context is burried in other method, so it's hard to
change style of the quoting. Extract it into a new method.
diff --git a/lib/RT/Transaction.pm b/lib/RT/Transaction.pm
index fa0d590…47ae072 100644
— a/lib/RT/Transaction.pm
+++ b/lib/RT/Transaction.pm
@@ -381,13 +381,24 @@ sub Content {
}
$content =~ s/^/> /gm;
$self->CreatedAsString, $self->CreatorObj->Name)
+=head2 QuoteHeader
+Returns text prepended to content when transaction is quoted
+(see C argument in L). By default returns
+localized “On wrote:\n”.
+=cut
+sub QuoteHeader {
- my $self = shift;
- return $self->loc(“On [_1], [_2] wrote:”, $self->CreatedAsString,
$self->CreatorObj->Name);
+}
=head2 Addresses
Help is much appreciated, best regards,
Marit
Best regards, Ruslan.