[Rt-commit] rt branch, 3.9-subject_tag_cleanup, created. rt-3.9.4-246-g53fc6d6
Ruslan Zakirov
ruz at bestpractical.com
Wed Nov 3 02:05:34 EDT 2010
The branch, 3.9-subject_tag_cleanup has been created
at 53fc6d6223b397a173c16451fb5c6734b37e6478 (commit)
- Log -----------------------------------------------------------------
commit c8f42a5608f058734559847125b9fea96eafd163
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date: Wed Nov 3 08:06:38 2010 +0300
RT::Ticket->SubjectTag method
diff --git a/lib/RT/Ticket_Overlay.pm b/lib/RT/Ticket_Overlay.pm
index 59172dc..6573513 100755
--- a/lib/RT/Ticket_Overlay.pm
+++ b/lib/RT/Ticket_Overlay.pm
@@ -1813,8 +1813,25 @@ sub QueueObj {
return ($self->{_queue_obj});
}
+=head2 SubjectTag
+Takes nothing. Returns SubjectTag for this ticket. Includes
+queue's subject tag or rtname if that is not set, ticket
+id and braces, for example:
+ [support.example.com #123456]
+
+=cut
+
+sub SubjectTag {
+ my $self = shift;
+ return
+ '['
+ . ($self->QueueObj->SubjectTag || RT->Config->Get('rtname'))
+ .' #'. $self->id
+ .']'
+ ;
+}
=head2 DueObj
commit 7367cf4eced73e2a7d92a0401dbc0db86c963d2b
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date: Wed Nov 3 08:57:48 2010 +0300
use new RT::Ticket->SubjectTag
diff --git a/docs/queue_subject_tag.pod b/docs/queue_subject_tag.pod
index 084c813..1b35ca6 100644
--- a/docs/queue_subject_tag.pod
+++ b/docs/queue_subject_tag.pod
@@ -24,7 +24,7 @@ If you want to subjects to be "prefix [tag] real subject" like
in default autoreply then you can use the following code in
templates to place subject tag whenever you want in a template:
- [{ $Ticket->QueueObj->SubjectTag || $rtname } #{$Ticket->id()}]
+ { $Ticket->SubjectTag }
B<Note> that in the extension from the CPAN Tag method have
been used when in 3.8 and newer it's SubjectTag, so you have to upgrade
@@ -56,7 +56,7 @@ For example, RT's default "Autoreply" includes this line:
Change this line to read:
"There is no need to reply to this message right now. Your ticket has been
- assigned an ID of [{ $Ticket->QueueObj->SubjectTag || $rtname } #{$Ticket->id()}]."
+ assigned an ID of { $Ticket->SubjectTag }."
=head2 For users of RT-Extension-BrandedQueues
@@ -73,7 +73,6 @@ This script will convert data in the DB into new format.
4) In templates where you were using Tag method (for example
C<< $Ticket-E<gt>QueueObj-E<gt>Tag >>) replace it with
-C<< $Ticket-E<gt>QueueObj-E<gt>SubjectTag >>. Read more in
-L</"Using tag in templates">
+new code. Read more in L</"Using tag in templates">.
=cut
diff --git a/etc/initialdata b/etc/initialdata
index f7653c1..212e962 100755
--- a/etc/initialdata
+++ b/etc/initialdata
@@ -206,11 +206,11 @@ creation of a trouble ticket regarding:
a summary of which appears below.
There is no need to reply to this message right now. Your ticket has been
-assigned an ID of [{$Ticket->QueueObj->SubjectTag || $rtname} #{$Ticket->id()}].
+assigned an ID of { $Ticket->SubjectTag }.
Please include the string:
- [{$Ticket->QueueObj->SubjectTag || $rtname} #{$Ticket->id}]
+ { $Ticket->SubjectTag }
in the subject line of all future correspondence about this issue. To do so,
you may reply to this message.
commit 53fc6d6223b397a173c16451fb5c6734b37e6478
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date: Wed Nov 3 09:04:25 2010 +0300
not subject tag in upgrading
diff --git a/UPGRADING b/UPGRADING
index e34b789..5ddf803 100644
--- a/UPGRADING
+++ b/UPGRADING
@@ -29,6 +29,15 @@ RT::Action, RT::Condition and RT::Search, respectively.
* The "Rights Delegation" and "Personal Groups" features have been removed.
+* Replace the following code in templates:
+
+ [{$Ticket->QueueObj->SubjectTag || $rtname} #{$Ticket->id}]
+
+with
+
+ { $Ticket->SubjectTag }
+
+
*******
UPGRADING FROM 3.8.8 and earlier - Changes:
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list