[Rt-commit] rtir branch, 4.0-trunk, updated. 4.0.0-22-g06ae522
Shawn Moore
shawn at bestpractical.com
Wed Jan 11 12:58:12 EST 2017
The branch, 4.0-trunk has been updated
via 06ae522c003090e1b2838fa679dde97471baaaa2 (commit)
via 0cf4d26ab9c4a98565655239a0404e810e400a99 (commit)
from d961446e29a587d622fb77e36e1d51a2ad2e5c91 (commit)
Summary of changes:
html/RTIR/Advanced.html | 3 +++
html/RTIR/Display.html | 3 +++
html/RTIR/Edit.html | 4 ++++
html/RTIR/Incident/Display.html | 3 +++
html/RTIR/Incident/Reply/index.html | 3 +++
html/RTIR/Update.html | 3 +++
6 files changed, 19 insertions(+)
- Log -----------------------------------------------------------------
commit 0cf4d26ab9c4a98565655239a0404e810e400a99
Author: Dustin Collins <strega at bestpractical.com>
Date: Mon Jan 9 11:16:10 2017 -0500
Update recently viewed tickets when viewing ticket pages
The "recently viewed tickets" feature was introduced in RT 4.4.2, so
this implementation in RTIR is conditional on whether the feature is
present to avoid breaking under RT 4.4.0 and 4.4.1.
Fixes: I#32484
diff --git a/html/RTIR/Advanced.html b/html/RTIR/Advanced.html
index 5f61918..391b3bd 100644
--- a/html/RTIR/Advanced.html
+++ b/html/RTIR/Advanced.html
@@ -143,6 +143,9 @@ unless ($Ticket->CurrentUserHasRight('ShowTicket')) {
my $Type = RT::IR::TicketType( Ticket => $Ticket );
my $Title = loc("Advanced edit $Type #[_1]", $id);
+$Ticket->CurrentUser->AddRecentlyViewedTicket($Ticket)
+ if $Ticket->CurrentUser->can('AddRecentlyViewedTicket');
+
</%INIT>
<%ARGS>
$id => undef
diff --git a/html/RTIR/Display.html b/html/RTIR/Display.html
index adf96b8..ddce0aa 100644
--- a/html/RTIR/Display.html
+++ b/html/RTIR/Display.html
@@ -297,6 +297,9 @@ if (defined $Ticket->TimeLeft && $Ticket->TimeLeft > 0 ) {
my $attachments = $Ticket->Attachments;
+$Ticket->CurrentUser->AddRecentlyViewedTicket($Ticket)
+ if $Ticket->CurrentUser->can('AddRecentlyViewedTicket');
+
</%INIT>
<%ARGS>
diff --git a/html/RTIR/Edit.html b/html/RTIR/Edit.html
index accf57a..79ca80f 100644
--- a/html/RTIR/Edit.html
+++ b/html/RTIR/Edit.html
@@ -266,6 +266,10 @@ if (RT::IR->IsReportQueue($Ticket->QueueObj)) {
unless ($Ticket->CurrentUserHasRight('ShowTicket')) {
Abort("No permission to view ticket");
}
+
+$Ticket->CurrentUser->AddRecentlyViewedTicket($Ticket)
+ if $Ticket->CurrentUser->can('AddRecentlyViewedTicket');
+
</%INIT>
<%ARGS>
diff --git a/html/RTIR/Incident/Display.html b/html/RTIR/Incident/Display.html
index bf96a01..21a9bb1 100644
--- a/html/RTIR/Incident/Display.html
+++ b/html/RTIR/Incident/Display.html
@@ -343,6 +343,9 @@ if ( defined $TicketObj->TimeLeft && $TicketObj->TimeLeft > 0 ) {
my $attachments = $TicketObj->Attachments;
+$TicketObj->CurrentUser->AddRecentlyViewedTicket($TicketObj)
+ if $TicketObj->CurrentUser->can('AddRecentlyViewedTicket');
+
</%INIT>
<%ARGS>
diff --git a/html/RTIR/Incident/Reply/index.html b/html/RTIR/Incident/Reply/index.html
index 710234c..126fe25 100644
--- a/html/RTIR/Incident/Reply/index.html
+++ b/html/RTIR/Incident/Reply/index.html
@@ -258,6 +258,9 @@ my $BaseURL = RT::IR->HREFTo("Incident/Reply/?".
my $candidates = RT::IR->IncidentChildren( $IncidentObj, Lifecycle => \@lifecycles )->Count;
+$IncidentObj->CurrentUser->AddRecentlyViewedTicket($IncidentObj)
+ if $IncidentObj->CurrentUser->can('AddRecentlyViewedTicket');
+
</%INIT>
<%ARGS>
diff --git a/html/RTIR/Update.html b/html/RTIR/Update.html
index f54b15b..1043301 100644
--- a/html/RTIR/Update.html
+++ b/html/RTIR/Update.html
@@ -246,6 +246,9 @@ if ( !$checks_failure && $SubmitTicket ) {
return $m->comp('/RTIR/Display.html', %ARGS);
}
+$Ticket->CurrentUser->AddRecentlyViewedTicket($Ticket)
+ if $Ticket->CurrentUser->can('AddRecentlyViewedTicket');
+
</%INIT>
<%ARGS>
commit 06ae522c003090e1b2838fa679dde97471baaaa2
Merge: d961446 0cf4d26
Author: Shawn M Moore <shawn at bestpractical.com>
Date: Wed Jan 11 12:58:08 2017 -0500
Merge branch '4.0/recent-tickets-list' into 4.0-trunk
-----------------------------------------------------------------------
More information about the rt-commit
mailing list