function getSearchOptionsActors()
{
$tab = array();
$tab['requester'] = __('Requester');
$tab[4]['table'] = 'glpi_users';
$tab[4]['field'] = 'name';
$tab[4]['datatype'] = 'dropdown';
$tab[4]['right'] = 'all';
$tab[4]['name'] = __('Requester');
$tab[4]['forcegroupby'] = true;
$tab[4]['massiveaction'] = false;
$tab[4]['joinparams'] = array('beforejoin' => array('table' => getTableForItemType($this->userlinkclass), 'joinparams' => array('jointype' => 'child', 'condition' => 'AND NEWTABLE.`type`
= ' . CommonITILActor::REQUESTER)));
if (!Session::isCron() && isset($_SESSION['glpiactiveprofile']['interface']) && $_SESSION['glpiactiveprofile']['interface'] == 'helpdesk') {
$tab[4]['right'] = 'id';
}
$tab[71]['table'] = 'glpi_groups';
$tab[71]['field'] = 'completename';
$tab[71]['datatype'] = 'dropdown';
$tab[71]['name'] = __('Requester group');
$tab[71]['forcegroupby'] = true;
$tab[71]['massiveaction'] = false;
$tab[71]['condition'] = 'is_requester';
$tab[71]['joinparams'] = array('beforejoin' => array('table' => getTableForItemType($this->grouplinkclass), 'joinparams' => array('jointype' => 'child', 'condition' => 'AND NEWTABLE.`type`
= ' . CommonITILActor::REQUESTER)));
if (!Session::isCron() && isset($_SESSION['glpiactiveprofile']['interface']) && $_SESSION['glpiactiveprofile']['interface'] == 'helpdesk') {
$tab[71]['condition'] .= " AND `id` IN (" . implode(",", $_SESSION['glpigroups']) . ")";
}
$tab[22]['table'] = 'glpi_users';
$tab[22]['field'] = 'name';
$tab[22]['datatype'] = 'dropdown';
$tab[22]['right'] = 'all';
$tab[22]['linkfield'] = 'users_id_recipient';
$tab[22]['name'] = __('Writer');
if (!Session::isCron() && isset($_SESSION['glpiactiveprofile']['interface']) && $_SESSION['glpiactiveprofile']['interface'] == 'helpdesk') {
$tab[22]['right'] = 'id';
}
$tab['observer'] = __('Watcher');
$tab[66]['table'] = 'glpi_users';
$tab[66]['field'] = 'name';
$tab[66]['datatype'] = 'dropdown';
$tab[66]['right'] = 'all';
$tab[66]['name'] = __('Watcher');
$tab[66]['forcegroupby'] = true;
$tab[66]['massiveaction'] = false;
$tab[66]['joinparams'] = array('beforejoin' => array('table' => getTableForItemType($this->userlinkclass), 'joinparams' => array('jointype' => 'child', 'condition' => 'AND NEWTABLE.`type`
= ' . CommonITILActor::OBSERVER)));
$tab[65]['table'] = 'glpi_groups';
$tab[65]['field'] = 'completename';
$tab[65]['datatype'] = 'dropdown';
$tab[65]['name'] = __('Watcher group');
$tab[65]['forcegroupby'] = true;
$tab[65]['massiveaction'] = false;
$tab[65]['condition'] = 'is_requester';
$tab[65]['joinparams'] = array('beforejoin' => array('table' => getTableForItemType($this->grouplinkclass), 'joinparams' => array('jointype' => 'child', 'condition' => 'AND NEWTABLE.`type`
= ' . CommonITILActor::OBSERVER)));
$tab['assign'] = __('Assigned to');
$tab[5]['table'] = 'glpi_users';
$tab[5]['field'] = 'name';
$tab[5]['datatype'] = 'dropdown';
$tab[5]['right'] = 'own_ticket';
$tab[5]['name'] = __('Technician');
$tab[5]['forcegroupby'] = true;
$tab[5]['massiveaction'] = false;
$tab[5]['joinparams'] = array('beforejoin' => array('table' => getTableForItemType($this->userlinkclass), 'joinparams' => array('jointype' => 'child', 'condition' => 'AND NEWTABLE.`type`
= ' . CommonITILActor::ASSIGN)));
$tab[6]['table'] = 'glpi_suppliers';
$tab[6]['field'] = 'name';
$tab[6]['datatype'] = 'dropdown';
$tab[6]['name'] = __('Assigned to a supplier');
$tab[6]['forcegroupby'] = true;
$tab[6]['massiveaction'] = false;
$tab[6]['joinparams'] = array('beforejoin' => array('table' => getTableForItemType($this->supplierlinkclass), 'joinparams' => array('jointype' => 'child', 'condition' => 'AND NEWTABLE.`type`
= ' . CommonITILActor::ASSIGN)));
$tab[8]['table'] = 'glpi_groups';
$tab[8]['field'] = 'completename';
$tab[8]['datatype'] = 'dropdown';
$tab[8]['name'] = __('Technician group');
$tab[8]['forcegroupby'] = true;
$tab[8]['massiveaction'] = false;
$tab[8]['condition'] = 'is_assign';
$tab[8]['joinparams'] = array('beforejoin' => array('table' => getTableForItemType($this->grouplinkclass), 'joinparams' => array('jointype' => 'child', 'condition' => 'AND NEWTABLE.`type`
= ' . CommonITILActor::ASSIGN)));
$tab['notification'] = _n('Notification', 'Notifications', Session::getPluralNumber());
$tab[35]['table'] = getTableForItemType($this->userlinkclass);
$tab[35]['field'] = 'use_notification';
$tab[35]['name'] = __('Email followup');
$tab[35]['datatype'] = 'bool';
$tab[35]['massiveaction'] = false;
$tab[35]['joinparams'] = array('jointype' => 'child', 'condition' => 'AND NEWTABLE.`type`
= ' . CommonITILActor::REQUESTER);
$tab[34]['table'] = getTableForItemType($this->userlinkclass);
$tab[34]['field'] = 'alternative_email';
$tab[34]['name'] = __('Email for followup');
$tab[34]['datatype'] = 'email';
$tab[34]['massiveaction'] = false;
$tab[34]['joinparams'] = array('jointype' => 'child', 'condition' => 'AND NEWTABLE.`type`
= ' . CommonITILActor::REQUESTER);
return $tab;
}