Index: tts/viewticket_details.php =================================================================== RCS file: /cvsroot/phpgroupware/tts/viewticket_details.php,v retrieving revision 1.43 diff -u -r1.43 viewticket_details.php --- tts/viewticket_details.php 27 Jan 2002 14:46:04 -0000 1.43 +++ tts/viewticket_details.php 15 Oct 2002 20:39:22 -0000 @@ -333,8 +333,8 @@ $GLOBALS['phpgw']->db->transaction_begin(); /* - ** phpgw_tts_append.append_type - Defs - ** R - Reopen ticket + ** phpgw_tts_append.append_type - Defs + ** R - Reopen ticket ** X - Ticket closed ** O - Ticket opened ** C - Comment appended @@ -349,10 +349,9 @@ if ($old_status != $ticket['status']) { $fields_updated = True; - $GLOBALS['phpgw']->historylog->add($ticket['status'],$ticket_id,''); - $GLOBALS['phpgw']->db->query("update phpgw_tts_tickets set ticket_status='" . $ticket['status'] . "' where ticket_id='$ticket_id'",__LINE__,__FILE__); + $GLOBALS['phpgw']->historylog->add($ticket['status'],$ticket_id,'',''); } if ($oldassigned != $ticket['assignedto']) @@ -360,7 +359,7 @@ $fields_updated = True; $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']); + $GLOBALS['phpgw']->historylog->add('A',$ticket_id,$ticket['assignedto'], $oldassigned); } if ($oldpriority != $ticket['priority']) @@ -368,7 +367,7 @@ $fields_updated = True; $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']); + $GLOBALS['phpgw']->historylog->add('P',$ticket_id,$ticket['priority'], $oldpriority); } if ($oldcategory != $ticket['category']) @@ -376,7 +375,7 @@ $fields_updated = True; $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']); + $GLOBALS['phpgw']->historylog->add('T',$ticket_id,$ticket['category'], $oldcategory); } if ($old_billable_hours != $ticket['billable_hours']) @@ -384,7 +383,7 @@ $fields_updated = True; $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']); + $GLOBALS['phpgw']->historylog->add('H',$ticket_id,$ticket['billable_hours'], $old_billable_hours); } if ($old_billable_rate != $ticket['billable_rate']) @@ -392,13 +391,13 @@ $fields_updated = True; $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']); + $GLOBALS['phpgw']->historylog->add('B',$ticket_id,$ticket['billable_rate'], $old_billable_rate); } if ($ticket['note']) { $fields_updated = True; - $GLOBALS['phpgw']->historylog->add('C',$ticket_id,$ticket['note']); + $GLOBALS['phpgw']->historylog->add('C',$ticket_id,$ticket['note'],''); // Do this before we go into mail_ticket() $GLOBALS['phpgw']->db->transaction_commit();