function support_update_6001 in Support Ticketing System 6
Introduce "autoassign" field for storing a per-client autoassign value.
File
- ./
support.install, line 405
Code
function support_update_6001() {
$ret = array();
db_add_field($ret, 'support_client', 'autoassign', array(
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
'description' => 'Optionally assign new tickets to this user.',
), array(
'indexes' => array(
'autoassign' => array(
'autoassign',
),
),
));
if (variable_get('support_autoassign_ticket', 0) == 0) {
variable_set('support_autoassign_ticket', '<nobody>');
}
else {
if (variable_get('support_autoassign_ticket', 0) == 1) {
variable_set('support_autoassign_ticket', '<creator>');
}
else {
variable_del('support_autoassign_ticket');
}
}
drupal_flush_all_caches();
return $ret;
}