import rt 3.8.8
[freeside.git] / rt / html / Ticket / Display.html
index 1c0aa41..7bdd57f 100644 (file)
@@ -2,7 +2,7 @@
 %# 
 %# COPYRIGHT:
 %#  
-%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC 
+%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC 
 %#                                          <jesse@bestpractical.com>
 %# 
 %# (Except where explicitly superseded by other copyright notices)
@@ -24,7 +24,7 @@
 %# along with this program; if not, write to the Free Software
 %# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 %# 02110-1301 or visit their web page on the internet at
-%# http://www.gnu.org/copyleft/gpl.html.
+%# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html.
 %# 
 %# 
 %# CONTRIBUTION SUBMISSION POLICY:
@@ -72,7 +72,8 @@
       
       &> 
 
-<& /Elements/Callback, _CallbackName => 'AfterShowHistory', Ticket => $TicketObj, %ARGS &>
+<& /Elements/Callback, _CallbackName => 'AfterShowHistory', Ticket => $TicketObj, 
+current_tab => 'Ticket/Display.html?id=' . $TicketObj->id, %ARGS &>
 
 <%ARGS>
 $id => undef
@@ -134,11 +135,10 @@ if ($ARGS{'id'} eq 'new') {
     }
 
     $ARGS{'UpdateContent'} =~ s/\r\n/\n/g if defined $ARGS{'UpdateContent'};
-    if ( $ARGS{'UpdateTimeWorked'} || (
-        defined $ARGS{'UpdateContent'}
+    if ( ( defined $ARGS{'UpdateContent'}
         && $ARGS{'UpdateContent'} ne ''
            && $ARGS{'UpdateContent'} ne "-- \n"
-              . $session{'CurrentUser'}->UserObj->Signature ) )
+              . $session{'CurrentUser'}->UserObj->Signature ) || $session{'Attachments'} )
     {
            $ARGS{UpdateAttachments} = $session{'Attachments'};
            ProcessUpdateMessage(
@@ -147,6 +147,9 @@ if ($ARGS{'id'} eq 'new') {
                        TicketObj => $TicketObj,
         );
            delete $session{'Attachments'};
+    } elsif ( $ARGS{'UpdateTimeWorked'} ) {
+        # Add UpdateTimeWorked to TimeWorked (processed below with ProcessTicketBasics)
+        $ARGS{'TimeWorked'} = $TicketObj->TimeWorked + $ARGS{'UpdateTimeWorked'};
     }
     #Process status updates
     my @PeopleActions = ProcessTicketWatchers(ARGSRef => \%ARGS, TicketObj=>$TicketObj);