$log = new Logging;
$log->set_bugid($bug['bugid']);
-$excludeFields = array(
- 'bugid',
- 'lastposttime',
- 'lastpostby',
- 'lastpostbyname',
- 'hiddenlastposttime',
- 'hiddenlastpostby',
- 'hiddenlastpostbyname',
-);
-
$notif = new NotificationCenter;
$bugapi = new BugAPI($bugsys);
$message->error_permission();
}
- $log->add_data(true, $bugapi->objdata, $excludeFields, true);
+ $log->add_data(true, $bugapi->objdata, $log->getCommonFields(), true);
// -------------------------------------------------------------------
// handle automations
// handle logging and perform updates
$notif->set_bug_data($bugapi->objdata, $bugapi->values);
- $log->add_data(false, $bugapi->values, $excludeFields, true);
+ $log->add_data(false, $bugapi->values, $log->getCommonFields(), true);
$bugapi->update();
// ###################################################################
/**
- * Returns an array of the common fields used by the logging mechanism
+ * Returns an array of the fields commonly ignored
*
* @access public
*
- * @return array Fields used in logging
+ * @return array Fields ignored in logging
*/
function getCommonFields()
{
return array(
- 'duplicateof',
- 'dependency',
- 'hidden',
- 'summary',
- 'status',
- 'severity',
- 'priority',
- 'version',
- 'assignedto' => 'assignto',
- 'resolution',
- 'product',
- 'component'
+ 'bugid',
+ 'lastposttime',
+ 'lastpostby',
+ 'lastpostbyname',
+ 'hiddenlastposttime',
+ 'hiddenlastpostby',
+ 'hiddenlastpostbyname'
);
}
}
$api = new BugApi($bugsys);
$api->set('bugid', $bug['bugid']);
$api->set_condition();
-
+ $api->values = $bug;
+
$log = new Logging();
$log->set_bugid($bug['bugid']);
- $log->add_data(true, $bug, $log->getCommonFields());
+ $log->add_data(true, $bug, $log->getCommonFields(), true);
if ($bugsys->in['status'] AND can_perform('canchangestatus', $bug['product']))
{
process_custom_fields($api, $message, false, true);
- $log->add_data(false, $api->values, $log->getCommonFields());
+ $log->add_data(false, $api->values, $log->getCommonFields(), true);
$api->update();
$log->update_history();