phpgroupware-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-cvs] CVS: tts newticket.php,1.31,1.31.2.1 viewticket_detai


From: Joseph Engo <address@hidden>
Subject: [Phpgroupware-cvs] CVS: tts newticket.php,1.31,1.31.2.1 viewticket_details.php,1.42,1.42.2.1
Date: Thu, 24 Jan 2002 14:45:37 -0500

Update of /cvsroot/phpgroupware/tts
In directory subversions:/tmp/cvs-serv11978

Modified Files:
      Tag: Version-0_9_14-branch
        newticket.php viewticket_details.php 
Log Message:
- Converted the history over to pass the old value


Index: newticket.php
===================================================================
RCS file: /cvsroot/phpgroupware/tts/newticket.php,v
retrieving revision 1.31
retrieving revision 1.31.2.1
diff -C2 -r1.31 -r1.31.2.1
*** newticket.php       16 Oct 2001 23:52:28 -0000      1.31
--- newticket.php       24 Jan 2002 19:45:34 -0000      1.31.2.1
***************
*** 1,14 ****
  <?php
!   /**************************************************************************\
!   * phpGroupWare - Trouble Ticket System                                     *
!   * http://www.phpgroupware.org                                              *
!   * --------------------------------------------                             *
!   *  This program is free software; you can redistribute it and/or modify it *
!   *  under the terms of the GNU General Public License as published by the   *
!   *  Free Software Foundation; either version 2 of the License, or (at your  *
!   *  option) any later version.                                              *
!   \**************************************************************************/
  
!   /* $Id$ */
  
        $submit = $HTTP_POST_VARS['submit'];
--- 1,15 ----
  <?php
!       
/**************************************************************************\
!       * phpGroupWare - Trouble Ticket System                                  
   *
!       * http://www.phpgroupware.org                                           
   *
!       * --------------------------------------------                          
   *
!       *  This program is free software; you can redistribute it and/or modify 
it *
!       *  under the terms of the GNU General Public License as published by 
the   *
!       *  Free Software Foundation; either version 2 of the License, or (at 
your  *
!       *  option) any later version.                                           
   *
!       
\**************************************************************************/
  
!       // $Id$
!       // $Source$
  
        $submit = $HTTP_POST_VARS['submit'];
***************
*** 50,54 ****
  
                $historylog = createobject('phpgwapi.historylog','tts');
!               $historylog->add('O',$ticket_id,'');
  
                if ($GLOBALS['phpgw_info']['server']['tts_mailticket'])
--- 51,55 ----
  
                $historylog = createobject('phpgwapi.historylog','tts');
!               $historylog->add('O',$ticket_id,' ','');
  
                if ($GLOBALS['phpgw_info']['server']['tts_mailticket'])

Index: viewticket_details.php
===================================================================
RCS file: /cvsroot/phpgroupware/tts/viewticket_details.php,v
retrieving revision 1.42
retrieving revision 1.42.2.1
diff -C2 -r1.42 -r1.42.2.1
*** viewticket_details.php      7 Jan 2002 10:50:42 -0000       1.42
--- viewticket_details.php      24 Jan 2002 19:45:34 -0000      1.42.2.1
***************
*** 10,14 ****
        
\**************************************************************************/
  
!       /* $Id$ */
  
        $GLOBALS['phpgw_info']['flags'] = array(
--- 10,15 ----
        
\**************************************************************************/
  
!       // $Id$
!       // $Source$
  
        $GLOBALS['phpgw_info']['flags'] = array(
***************
*** 194,197 ****
--- 195,199 ----
                
$GLOBALS['phpgw']->template->set_var('lang_action',lang('Action'));
                $GLOBALS['phpgw']->template->set_var('lang_new_value',lang('New 
Value'));
+               $GLOBALS['phpgw']->template->set_var('lang_old_value',lang('Old 
Value'));
  
                $history_array = 
$GLOBALS['phpgw']->historylog->return_array(array('C','O'),array(),'','',$ticket_id);
***************
*** 230,245 ****
--- 232,259 ----
                                        
$GLOBALS['phpgw']->template->set_var('value_new_value',$GLOBALS['phpgw']->accounts->id2name($value['new_value']));
                                }
+ 
+                               if (! $value['old_value'])
+                               {
+                                       
$GLOBALS['phpgw']->template->set_var('value_old_value',lang('None'));
+                               }
+                               else
+                               {
+                                       
$GLOBALS['phpgw']->template->set_var('value_old_value',$GLOBALS['phpgw']->accounts->id2name($value['old_value']));
+                               }
                        }
                        else if ($value['status'] == 'T')
                        {
                                
$GLOBALS['phpgw']->template->set_var('value_new_value',$GLOBALS['phpgw']->categories->id2name($value['new_value']));
+                               
$GLOBALS['phpgw']->template->set_var('value_old_value',$GLOBALS['phpgw']->categories->id2name($value['old_value']));
                        }
                        else if ($value['status'] != 'O' && $value['new_value'])
                        {
                                
$GLOBALS['phpgw']->template->set_var('value_new_value',$value['new_value']);
+                               
$GLOBALS['phpgw']->template->set_var('value_old_value',$value['old_value']);
                        }
                        else
                        {
                                
$GLOBALS['phpgw']->template->set_var('value_new_value','&nbsp;');
+                               
$GLOBALS['phpgw']->template->set_var('value_old_value','&nbsp;');
                        }
  
***************
*** 348,352 ****
                {
                        $fields_updated = True;
!                       
$GLOBALS['phpgw']->historylog->add($ticket['status'],$ticket_id,'');
  
                        $GLOBALS['phpgw']->db->query("update phpgw_tts_tickets 
set ticket_status='"
--- 362,366 ----
                {
                        $fields_updated = True;
!                       
$GLOBALS['phpgw']->historylog->add($ticket['status'],$ticket_id,$ticket['status'],$old_status);
  
                        $GLOBALS['phpgw']->db->query("update phpgw_tts_tickets 
set ticket_status='"
***************
*** 359,363 ****
                        $GLOBALS['phpgw']->db->query("update phpgw_tts_tickets 
set ticket_assignedto='" . $ticket['assignedto']
                                . "' where 
ticket_id='$ticket_id'",__LINE__,__FILE__);
!                       
$GLOBALS['phpgw']->historylog->add('A',$ticket_id,$ticket['assignedto']);
                }
  
--- 373,377 ----
                        $GLOBALS['phpgw']->db->query("update phpgw_tts_tickets 
set ticket_assignedto='" . $ticket['assignedto']
                                . "' where 
ticket_id='$ticket_id'",__LINE__,__FILE__);
!                       
$GLOBALS['phpgw']->historylog->add('A',$ticket_id,$ticket['assignedto'],$oldassigned);
                }
  
***************
*** 367,371 ****
                        $GLOBALS['phpgw']->db->query("update phpgw_tts_tickets 
set ticket_priority='" . $ticket['priority']
                                . "' where 
ticket_id='$ticket_id'",__LINE__,__FILE__);
!                       
$GLOBALS['phpgw']->historylog->add('P',$ticket_id,$ticket['priority']);
                }
  
--- 381,385 ----
                        $GLOBALS['phpgw']->db->query("update phpgw_tts_tickets 
set ticket_priority='" . $ticket['priority']
                                . "' where 
ticket_id='$ticket_id'",__LINE__,__FILE__);
!                       
$GLOBALS['phpgw']->historylog->add('P',$ticket_id,$ticket['priority'],$oldpriority);
                }
  
***************
*** 375,379 ****
                        $GLOBALS['phpgw']->db->query("update phpgw_tts_tickets 
set ticket_category='" . $ticket['category']
                                . "' where 
ticket_id='$ticket_id'",__LINE__,__FILE__);
!                       
$GLOBALS['phpgw']->historylog->add('T',$ticket_id,$ticket['category']);
                }
  
--- 389,393 ----
                        $GLOBALS['phpgw']->db->query("update phpgw_tts_tickets 
set ticket_category='" . $ticket['category']
                                . "' where 
ticket_id='$ticket_id'",__LINE__,__FILE__);
!                       
$GLOBALS['phpgw']->historylog->add('T',$ticket_id,$ticket['category'],$oldcategory);
                }
  
***************
*** 383,387 ****
                        $GLOBALS['phpgw']->db->query("update phpgw_tts_tickets 
set ticket_billable_hours='" . $ticket['billable_hours']
                                . "' where 
ticket_id='$ticket_id'",__LINE__,__FILE__);
!                       
$GLOBALS['phpgw']->historylog->add('H',$ticket_id,$ticket['billable_hours']);
                }
  
--- 397,401 ----
                        $GLOBALS['phpgw']->db->query("update phpgw_tts_tickets 
set ticket_billable_hours='" . $ticket['billable_hours']
                                . "' where 
ticket_id='$ticket_id'",__LINE__,__FILE__);
!                       
$GLOBALS['phpgw']->historylog->add('H',$ticket_id,$ticket['billable_hours'],$old_billable_hours);
                }
  
***************
*** 391,395 ****
                        $GLOBALS['phpgw']->db->query("update phpgw_tts_tickets 
set ticket_billable_rate='" . $ticket['billable_rate']
                                . "' where 
ticket_id='$ticket_id'",__LINE__,__FILE__);
!                       
$GLOBALS['phpgw']->historylog->add('B',$ticket_id,$ticket['billable_rate']);
                }
  
--- 405,409 ----
                        $GLOBALS['phpgw']->db->query("update phpgw_tts_tickets 
set ticket_billable_rate='" . $ticket['billable_rate']
                                . "' where 
ticket_id='$ticket_id'",__LINE__,__FILE__);
!                       
$GLOBALS['phpgw']->historylog->add('B',$ticket_id,$ticket['billable_rate'],$old_billable_rate);
                }
  
***************
*** 397,401 ****
                {
                        $fields_updated = True;
!                       
$GLOBALS['phpgw']->historylog->add('C',$ticket_id,$ticket['note']);
  
                        // Do this before we go into mail_ticket()
--- 411,415 ----
                {
                        $fields_updated = True;
!                       
$GLOBALS['phpgw']->historylog->add('C',$ticket_id,$ticket['note'],'');
  
                        // Do this before we go into mail_ticket()




reply via email to

[Prev in Thread] Current Thread [Next in Thread]