diff --git a/htdocs/comm/action/list.php b/htdocs/comm/action/list.php index d20b3050a55..817633339dc 100644 --- a/htdocs/comm/action/list.php +++ b/htdocs/comm/action/list.php @@ -58,6 +58,7 @@ else } if ($actioncode == '' && empty($actioncodearray)) $actioncode=(empty($conf->global->AGENDA_DEFAULT_FILTER_TYPE)?'':$conf->global->AGENDA_DEFAULT_FILTER_TYPE); $search_title=GETPOST('search_title','alpha'); +$search_note=GETPOST('search_note','alpha'); $dateselect=dol_mktime(0, 0, 0, GETPOST('dateselectmonth','int'), GETPOST('dateselectday','int'), GETPOST('dateselectyear','int')); $datestart=dol_mktime(0, 0, 0, GETPOST('datestartmonth','int'), GETPOST('datestartday','int'), GETPOST('datestartyear','int')); @@ -123,6 +124,7 @@ $arrayfields=array( 'owner'=>array('label'=>"Owner", 'checked'=>1), 'c.libelle'=>array('label'=>"Type", 'checked'=>1), 'a.label'=>array('label'=>"Title", 'checked'=>1), + 'a.note'=>array('label'=>'Description', 'checked'=>0), 'a.datep'=>array('label'=>"DateStart", 'checked'=>1), 'a.datep2'=>array('label'=>"DateEnd", 'checked'=>1), 's.nom'=>array('label'=>"ThirdParty", 'checked'=>1), @@ -171,6 +173,7 @@ if (GETPOST('button_removefilter_x','alpha') || GETPOST('button_removefilter.x', { //$actioncode=''; $search_title=''; + $search_note=''; $datestart=''; $dateend=''; $status=''; @@ -217,6 +220,7 @@ if ($type) $param.="&type=".$type; if ($usergroup) $param.="&usergroup=".$usergroup; if ($optioncss != '') $param.='&optioncss='.$optioncss; if ($search_title != '') $param.='&search_title='.$search_title; +if ($search_note != '') $param.='&search_note='.$search_note; if (GETPOST('datestartday','int')) $param.='&datestartday='.GETPOST('datestartday','int'); if (GETPOST('datestartmonth','int')) $param.='&datestartmonth='.GETPOST('datestartmonth','int'); if (GETPOST('datestartyear','int')) $param.='&datestartyear='.GETPOST('datestartyear','int'); @@ -229,7 +233,7 @@ include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php'; $sql = "SELECT"; if ($usergroup > 0) $sql.=" DISTINCT"; $sql.= " s.nom as societe, s.rowid as socid, s.client,"; -$sql.= " a.id, a.label, a.datep as dp, a.datep2 as dp2,"; +$sql.= " a.id, a.label, a.note, a.datep as dp, a.datep2 as dp2,"; $sql.= ' a.fk_user_author,a.fk_user_action,'; $sql.= " a.fk_contact, a.note, a.percent as percent,"; $sql.= " a.fk_element, a.elementtype,"; @@ -301,6 +305,7 @@ if ($status == '100') { $sql.= " AND a.percent = 100"; } if ($status == 'done' || $status == '100') { $sql.= " AND (a.percent = 100)"; } if ($status == 'todo') { $sql.= " AND (a.percent >= 0 AND a.percent < 100)"; } if ($search_title) $sql.=natural_search("a.label", $search_title); +if ($search_note) $sql.=natural_search('a.note', $search_note); // We must filter on assignement table if ($filtert > 0 || $usergroup > 0) { @@ -442,6 +447,7 @@ if ($resql) if (! empty($arrayfields['owner']['checked'])) print '