! Hopeful fix for the intermittent error of 'none selected being changed to none selected'. This shouldn't affect other field changes being logged (and doesn't for me) but please check that your field changes are logged as expected. [Bug 748]
gruffen

gruffen commited on 2011-07-06 01:15:41
Showing 1 changed files, with 3 additions and 0 deletions.

... ...
@@ -625,6 +625,8 @@ function shd_modify_ticket_post(&$msgOptions, &$ticketOptions, &$posterOptions)
625 625
 				$newvalue = !empty($field['new_value']) && ($field['type'] == CFIELD_TYPE_RADIO || $field['type'] == CFIELD_TYPE_SELECT) ? $field['options'][$field['new_value']] : $field['new_value'];
626 626
 			}
627 627
 
628
+			if ($oldvalue != $newvalue)
629
+			{
628 630
 				$context['custom_fields_updated'][] = array(
629 631
 					'ticket' => $ticketOptions['id'],
630 632
 					'msg' => $msgOptions['id'],
... ...
@@ -639,6 +641,7 @@ function shd_modify_ticket_post(&$msgOptions, &$ticketOptions, &$posterOptions)
639 641
 					$context['custom_fields_updated'][count($context['custom_fields_updated'])-1]['default'] = true;
640 642
 			}
641 643
 		}
644
+	}
642 645
 	// If there are rows to add or update, commence.
643 646
 	if (!empty($rows))
644 647
 	{
645 648