You are not logged in.
Pages: 1
Hello, I'm trying to add a search filter for tickets where in the follow-up there will be a phrase that starts with #NONCOMPLIANT or #COMPLIANT. So I'm adding the filter like this:
php
$followup_condition = [ 1 => '#NONCOMPLIANT', // Maps 1 to "NONCOMPLIANT" 0 => '#COMPLIANT', // Maps 0 to "COMPLIANT" ]; $opt['700003'] = [ 'table' => ITILFollowup::getTable(), 'field' => 'content', 'name' => __g4t('ACCORDING TO'), 'datatype' => 'bool', 'right' => [ 1 => '#NONCOMPLIANT', // Maps 1 to "NONCOMPLIANT" 0 => '#COMPLIANT', // Maps 0 to "COMPLIANT" ], 'massiveaction' => false, 'joinparams' => [ 'jointype' => 'itemtype_item', 'condition' => 'AND NEWTABLE.`content` = \'' . $followup_condition . '\'' ] ];
However, it doesn't work, leaving the query incorrectly formed with an AND at the end that breaks it, as in the example below:
sql
LEFT JOIN `glpi_itilfollowups` AS `glpi_itilfollowups_4328b855126e8759c86e755314504bb3` ON (`glpi_tickets
Offline
Pages: 1