[Rt-commit] rt branch, 4.2/ticket-subject-on-modify, created. rt-4.1.17-138-g8c4cc5f

Shawn Moore shawn at bestpractical.com
Fri Apr 22 13:32:56 EDT 2016


The branch, 4.2/ticket-subject-on-modify has been created
        at  8c4cc5feba21f4e343d148d55b663793bd3ad191 (commit)

- Log -----------------------------------------------------------------
commit 8c4cc5feba21f4e343d148d55b663793bd3ad191
Author: Kevin Falcone <falcone at bestpractical.com>
Date:   Mon Jul 22 16:15:37 2013 -0400

    Show the Ticket's Subject when modifying the ticket.
    
    This makes it a lot easier to remember what ticket you're on when using
    the Links page, and in general improves the usability of these pages.
    
    Fix up the reminders tests that look at the entire ticket title on the
    Modify page.
    
    Fixes Ticket/Update.html to have formatting consistent with the rest of
    the pages.

diff --git a/share/html/Ticket/Forward.html b/share/html/Ticket/Forward.html
index 2c20daf..efada31 100644
--- a/share/html/Ticket/Forward.html
+++ b/share/html/Ticket/Forward.html
@@ -109,8 +109,8 @@ if ( $Forward || $ForwardAndReturn ) {
 }
 
 my $Title = $txn
-    ? loc('Forward transaction #[_1]', $txn->id)
-    : loc('Forward ticket #[_1]', $TicketObj->id);
+    ? loc('Forward transaction #[_1]: [_2]', $txn->id, $TicketObj->Subject)
+    : loc('Forward ticket #[_1]: [_2]', $TicketObj->id, $TicketObj->Subject);
 
 my $from = RT::Interface::Email::GetForwardFrom(
     $txn ? ( Transaction => $txn ) : ( Ticket => $TicketObj ) );
diff --git a/share/html/Ticket/GnuPG.html b/share/html/Ticket/GnuPG.html
index f3a29f6..db7e4b3 100644
--- a/share/html/Ticket/GnuPG.html
+++ b/share/html/Ticket/GnuPG.html
@@ -96,5 +96,5 @@ if ( $Encrypt || $Decrypt ) {
     $encrypted = !$encrypted if $done;
 }
 
-my $title = loc("Encrypt/Decrypt transaction #[_1] of ticket #[_2]", $id, $txn->Ticket);
+my $title = loc("Encrypt/Decrypt transaction #[_1] of ticket #[_2]: [_3]", $id, $txn->Ticket, $txn->TicketObj->Subject);
 </%INIT>
diff --git a/share/html/Ticket/History.html b/share/html/Ticket/History.html
index 1dc49d0..47d2c1e 100644
--- a/share/html/Ticket/History.html
+++ b/share/html/Ticket/History.html
@@ -45,7 +45,7 @@
 %# those contributions and any derivatives thereof.
 %#
 %# END BPS TAGGED BLOCK }}}
-<& /Elements/Header, Title => loc("Ticket History # [_1] [_2]", $Ticket->Id, $Ticket->Subject) &>
+<& /Elements/Header, Title => loc("Ticket History #[_1]: [_2]", $Ticket->Id, $Ticket->Subject) &>
 <& /Elements/Tabs &>
 
 % $m->callback( %ARGS, Ticket => $Ticket, CallbackName => 'BeforeActionList' );
diff --git a/share/html/Ticket/Modify.html b/share/html/Ticket/Modify.html
index e9ef761..76d3588 100644
--- a/share/html/Ticket/Modify.html
+++ b/share/html/Ticket/Modify.html
@@ -45,7 +45,7 @@
 %# those contributions and any derivatives thereof.
 %#
 %# END BPS TAGGED BLOCK }}}
-<& /Elements/Header, Title => loc('Modify ticket #[_1]', $TicketObj->Id) &>
+<& /Elements/Header, Title => loc('Modify ticket #[_1]: [_2]', $TicketObj->Id, $TicketObj->Subject) &>
 <& /Elements/Tabs &>
 
 % $m->callback(CallbackName => 'BeforeActionList', Actions => \@results, ARGSRef => \%ARGS, Ticket => $TicketObj);
diff --git a/share/html/Ticket/ModifyDates.html b/share/html/Ticket/ModifyDates.html
index 44c9395..4096cee 100644
--- a/share/html/Ticket/ModifyDates.html
+++ b/share/html/Ticket/ModifyDates.html
@@ -45,7 +45,7 @@
 %# those contributions and any derivatives thereof.
 %#
 %# END BPS TAGGED BLOCK }}}
-<& /Elements/Header, Title => loc('Modify dates for #[_1]', $TicketObj->Id) &>
+<& /Elements/Header, Title => loc('Modify dates for #[_1]: [_2]', $TicketObj->Id, $TicketObj->Subject) &>
 <& /Elements/Tabs &>
 
 % $m->callback(CallbackName => 'BeforeActionList', Actions => \@results, ARGSRef => \%ARGS, Ticket => $TicketObj);
diff --git a/share/html/Ticket/ModifyLinks.html b/share/html/Ticket/ModifyLinks.html
index 677733d..dac2285 100644
--- a/share/html/Ticket/ModifyLinks.html
+++ b/share/html/Ticket/ModifyLinks.html
@@ -45,7 +45,7 @@
 %# those contributions and any derivatives thereof.
 %#
 %# END BPS TAGGED BLOCK }}}
-<& /Elements/Header, Title => loc("Link ticket #[_1]", $Ticket->Id) &>
+<& /Elements/Header, Title => loc("Link ticket #[_1]: [_2]", $Ticket->Id, $Ticket->Subject) &>
 <& /Elements/Tabs &>
 
 % $m->callback(CallbackName => 'BeforeActionList', Actions => \@results, ARGSRef => \%ARGS, Ticket => $Ticket);
diff --git a/share/html/Ticket/ModifyPeople.html b/share/html/Ticket/ModifyPeople.html
index 977bb30..5b93d48 100644
--- a/share/html/Ticket/ModifyPeople.html
+++ b/share/html/Ticket/ModifyPeople.html
@@ -45,7 +45,7 @@
 %# those contributions and any derivatives thereof.
 %#
 %# END BPS TAGGED BLOCK }}}
-<& /Elements/Header, Title => loc('Modify people related to ticket #[_1]', $Ticket->id) &>
+<& /Elements/Header, Title => loc('Modify people related to ticket #[_1]: [_2]', $Ticket->id, $Ticket->Subject) &>
 <& /Elements/Tabs &>
 
 % $m->callback(CallbackName => 'BeforeActionList', Actions => \@results, ARGSRef => \%ARGS, Ticket => $Ticket);
diff --git a/share/html/Ticket/Reminders.html b/share/html/Ticket/Reminders.html
index b37edf5..3d45d94 100644
--- a/share/html/Ticket/Reminders.html
+++ b/share/html/Ticket/Reminders.html
@@ -45,7 +45,7 @@
 %# those contributions and any derivatives thereof.
 %#
 %# END BPS TAGGED BLOCK }}}
-<& /Elements/Header, Title => loc("Reminders for ticket #[_1]", $Ticket->Id) &>
+<& /Elements/Header, Title => loc("Reminders for ticket #[_1]: [_2]", $Ticket->Id, $Ticket->Subject) &>
 <& /Elements/Tabs &>
     
 % $m->callback(CallbackName => 'BeforeActionList', ARGSRef => \%ARGS, Ticket => $Ticket);
diff --git a/share/html/Ticket/Update.html b/share/html/Ticket/Update.html
index 23ea378..99cb98d 100644
--- a/share/html/Ticket/Update.html
+++ b/share/html/Ticket/Update.html
@@ -215,7 +215,7 @@ unless($DefaultStatus){
     $DefaultStatus=($ARGS{'Status'} ||$TicketObj->Status());
 }
 
-my $title = loc("Update ticket #[_1] ([_2])", $TicketObj->id, $TicketObj->Subject||'');
+my $title = loc("Update ticket #[_1]: [_2]", $TicketObj->id, $TicketObj->Subject);
 
 # Things needed in the template - we'll do the processing here, just
 # for the convenience:
diff --git a/t/web/reminder-permissions.t b/t/web/reminder-permissions.t
index dd859cd..6f20497 100644
--- a/t/web/reminder-permissions.t
+++ b/t/web/reminder-permissions.t
@@ -90,7 +90,7 @@ qr!<input[^/]+name="Complete-Reminder-$root_reminder_id"[^/]+disabled="disabled"
         'complete user_a reminder' );
 
     $m_a->follow_link_ok( { id => 'page-reminders' } );
-    $m_a->title_is( "Reminders for ticket #" . $ticket->id );
+    $m_a->title_is("Reminders for ticket #" . $ticket->id . ": " . $ticket->Subject);
     $m_a->content_contains( 'root reminder',   'can see root reminder' );
     $m_a->content_contains( 'user_a reminder', 'can see user_a reminder' );
     $m_a->content_lacks( 'New reminder:', 'can not create a new reminder' );
@@ -126,7 +126,7 @@ qr!<input[^/]+name="Complete-Reminder-$root_reminder_id"[^/]+disabled="disabled"
         'created user_a from display reminder' );
 
     $m_a->follow_link_ok( { id => 'page-reminders' } );
-    $m_a->title_is( "Reminders for ticket #" . $ticket->id );
+    $m_a->title_is("Reminders for ticket #" . $ticket->id . ": " . $ticket->Subject);
     $m_a->content_contains( 'New reminder:', 'can create a new reminder' );
     $m_a->content_like(
 qr!<input[^/]+name="Complete-Reminder-$root_reminder_id"[^/]+disabled="disabled"!,
diff --git a/t/web/reminders.t b/t/web/reminders.t
index 98a8d69..e1eb46d 100644
--- a/t/web/reminders.t
+++ b/t/web/reminders.t
@@ -17,7 +17,7 @@ $m->content_unlike(qr{Check box to complete}, "we don't display this text when t
 $m->content_unlike(qr{<th[^>]*>Reminders?</th>}, "no reminder titlebar");
 
 $m->follow_link_ok({id => 'page-reminders'});
-$m->title_is("Reminders for ticket #" . $ticket->id);
+$m->title_is("Reminders for ticket #" . $ticket->id . ": " . $ticket->Subject);
 $m->text_contains('New reminder:', 'can create a new reminder');
 $m->content_unlike(qr{Check box to complete}, "we don't display this text when there are no reminders");
 $m->content_unlike(qr{<th[^>]*>Reminders?</th>}, "no reminder titlebar");
@@ -63,7 +63,7 @@ $m->content_like(qr{<th[^>]*>Reminders?</th>}, "now we have a reminder titlebar"
 $m->text_contains("baby's first reminder", "display the reminder's subject");
 
 $m->follow_link_ok({id => 'page-reminders'});
-$m->title_is("Reminders for ticket #" . $ticket->id);
+$m->title_is("Reminders for ticket #" . $ticket->id . ": " . $ticket->Subject);
 $m->form_name('UpdateReminders');
 $m->field("Reminder-Subject-$reminder_id" => "changed the subject");
 $m->submit;
@@ -90,7 +90,7 @@ $m->content_unlike(qr{<th[^>]*>Reminders?</th>}, "no reminder titlebar");
 $m->content_unlike(qr{baby's first reminder}, "we don't display resolved reminders");
 
 $m->follow_link_ok({id => 'page-reminders'});
-$m->title_is("Reminders for ticket #" . $ticket->id);
+$m->title_is("Reminders for ticket #" . $ticket->id . ": " . $ticket->Subject);
 $m->text_contains('New reminder:', 'can create a new reminder');
 $m->text_contains('Check box to complete', "we DO display this text when there are reminders");
 $m->content_contains("changed the subject", "display the resolved reminder's subject");

-----------------------------------------------------------------------


More information about the rt-commit mailing list