[Rt-commit] r4921 - in rtir/branches/1.9-EXPERIMENTAL: html/Callbacks/RTIR/Ticket/Elements/ShowTransaction html/RTIR html/RTIR/Incident

ruz at bestpractical.com ruz at bestpractical.com
Thu Mar 30 20:01:55 EST 2006


Author: ruz
Date: Thu Mar 30 20:01:54 2006
New Revision: 4921

Modified:
   rtir/branches/1.9-EXPERIMENTAL/   (props changed)
   rtir/branches/1.9-EXPERIMENTAL/html/Callbacks/RTIR/Ticket/Elements/ShowTransaction/ModifyDisplay
   rtir/branches/1.9-EXPERIMENTAL/html/RTIR/Display.html
   rtir/branches/1.9-EXPERIMENTAL/html/RTIR/Incident/Display.html

Log:
 r1202 at cubic-pc:  cubic | 2006-03-31 05:09:46 +0400
 * link article to ticket wasn't working with non incidents


Modified: rtir/branches/1.9-EXPERIMENTAL/html/Callbacks/RTIR/Ticket/Elements/ShowTransaction/ModifyDisplay
==============================================================================
--- rtir/branches/1.9-EXPERIMENTAL/html/Callbacks/RTIR/Ticket/Elements/ShowTransaction/ModifyDisplay	(original)
+++ rtir/branches/1.9-EXPERIMENTAL/html/Callbacks/RTIR/Ticket/Elements/ShowTransaction/ModifyDisplay	Thu Mar 30 20:01:54 2006
@@ -4,9 +4,10 @@
 # useful for removing _RTIR_ from RTIR custom fields
 # $text is passed by reference
 
-if ($Transaction->Type eq 'CustomField' && 
-    substr($$text, 0, length($prefix)) eq $prefix) {
-  $$text = substr($$text, length($prefix));
+if ( $Transaction->Type eq 'CustomField' && 
+     substr($$text, 0, length($prefix)) eq $prefix )
+{
+    substr($$text, 0, length($prefix)) = '';
 }
 
 </%INIT>

Modified: rtir/branches/1.9-EXPERIMENTAL/html/RTIR/Display.html
==============================================================================
--- rtir/branches/1.9-EXPERIMENTAL/html/RTIR/Display.html	(original)
+++ rtir/branches/1.9-EXPERIMENTAL/html/RTIR/Display.html	Thu Mar 30 20:01:54 2006
@@ -245,7 +245,7 @@
 
     if ( $ARGS{'TakeOrStealFirst'} and $Ticket->Owner != $Ticket->CurrentUser->Id) {
         my ($status, $msg) = $Ticket->SetOwner($Ticket->CurrentUser->Id, 'Force');
-	push @results, $msg if $msg;
+        push @results, $msg if $msg;
     }
 
     $ARGS{UpdateAttachments} = delete $session{'Attachments'};
@@ -269,6 +269,11 @@
     }
 }
 
+if ( $ARGS{'BulkArticles'} && @SelectedTickets ) {
+    my $ref = join " ", map "a:$_", @SelectedTickets;
+    push @results, ProcessTicketLinks( TicketObj => $Ticket, ARGSRef => {$Ticket->Id."-RefersTo" => $ref} );
+}
+
 unless ( $Ticket->CurrentUserHasRight('ShowTicket') ) {
     if( $id eq 'new' ) {
         Abort("No permission to view newly created ticket #".$Ticket->id.".");
@@ -299,4 +304,5 @@
 $id => 0
 $Queue => undef
 @results => undef
+ at SelectedTickets => ()
 </%ARGS>

Modified: rtir/branches/1.9-EXPERIMENTAL/html/RTIR/Incident/Display.html
==============================================================================
--- rtir/branches/1.9-EXPERIMENTAL/html/RTIR/Incident/Display.html	(original)
+++ rtir/branches/1.9-EXPERIMENTAL/html/RTIR/Incident/Display.html	Thu Mar 30 20:01:54 2006
@@ -312,8 +312,8 @@
             push @results, $DoLinks->( $child, $TicketObj );
         }
     }
-    if ($ARGS{'BulkArticles'}) {
-        my $ref = join " ", map {"a:$_"} @SelectedTickets;
+    if ( $ARGS{'BulkArticles'} && @SelectedTickets ) {
+        my $ref = join " ", map "a:$_", @SelectedTickets;
         push @results, ProcessTicketLinks( TicketObj => $TicketObj, ARGSRef => {$TicketObj->Id."-RefersTo" => $ref} );
     }
 


More information about the Rt-commit mailing list