[Bps-public-commit] rt-extension-linkedticketshistory branch, master, updated. 0.02-2-gb74d12f

? sunnavy sunnavy at bestpractical.com
Wed Nov 4 16:40:58 EST 2015


The branch, master has been updated
       via  b74d12ff004210ce24a563e2ec915f3c1c9b930f (commit)
       via  1f974ea147b05d3928257f6f861429e96bd02f48 (commit)
      from  ee35610eba5b0a3ed56f68d05982baecde3a503b (commit)

Summary of changes:
 README                                                              | 6 +++++-
 .../LinkedTicketsHistory/Ticket/Display.html/AfterShowHistory       | 2 +-
 lib/RT/Extension/LinkedTicketsHistory.pm                            | 6 +++++-
 3 files changed, 11 insertions(+), 3 deletions(-)

- Log -----------------------------------------------------------------
commit 1f974ea147b05d3928257f6f861429e96bd02f48
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Thu Nov 5 04:48:21 2015 +0800

    make sure $ticket is defined
    
    if users link to external objects, $ticket could be undef

diff --git a/html/Callbacks/LinkedTicketsHistory/Ticket/Display.html/AfterShowHistory b/html/Callbacks/LinkedTicketsHistory/Ticket/Display.html/AfterShowHistory
index 47af0b8..70d386e 100644
--- a/html/Callbacks/LinkedTicketsHistory/Ticket/Display.html/AfterShowHistory
+++ b/html/Callbacks/LinkedTicketsHistory/Ticket/Display.html/AfterShowHistory
@@ -13,7 +13,7 @@ for my $type ( @link_types ) {
     my $links = $Ticket->$type;
     while ( my $link = $links->Next ) {
         my $ticket = $type =~ /MemberOf|RefersTo|DependsOn/ ? $link->TargetObj : $link->BaseObj;
-        next unless $ticket->isa('RT::Ticket'); # link could be an article
+        next unless $ticket && $ticket->isa('RT::Ticket'); # link could be an article
         push @tickets, $ticket if $ticket->CurrentUserHasRight('ShowTicket');
     }
 }

commit b74d12ff004210ce24a563e2ec915f3c1c9b930f
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Thu Nov 5 05:40:04 2015 +0800

    document the new Plugin syntax for 4.2+

diff --git a/README b/README
index f78f2dd..1da95fd 100644
--- a/README
+++ b/README
@@ -9,7 +9,11 @@ INSTALLATION
         May need root permissions
 
     Edit your /opt/rt4/etc/RT_SiteConfig.pm
-        Add this line:
+        If you are using RT 4.2 or greater, add this line:
+
+            Plugin('RT::Extension::LinkedTicketsHistory');
+
+        For RT 4.0, add this line:
 
             Set(@Plugins, qw(RT::Extension::LinkedTicketsHistory));
 
diff --git a/lib/RT/Extension/LinkedTicketsHistory.pm b/lib/RT/Extension/LinkedTicketsHistory.pm
index 7ddf7d3..7f38bf4 100644
--- a/lib/RT/Extension/LinkedTicketsHistory.pm
+++ b/lib/RT/Extension/LinkedTicketsHistory.pm
@@ -22,7 +22,11 @@ May need root permissions
 
 =item Edit your F</opt/rt4/etc/RT_SiteConfig.pm>
 
-Add this line:
+If you are using RT 4.2 or greater, add this line:
+
+    Plugin('RT::Extension::LinkedTicketsHistory');
+
+For RT 4.0, add this line:
 
     Set(@Plugins, qw(RT::Extension::LinkedTicketsHistory));
 

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


More information about the Bps-public-commit mailing list