Skip to content

Commit

Permalink
fix(targetticket,targetchange): specific tags not applicable
Browse files Browse the repository at this point in the history
Signed-off-by: Thierry Bugier <tbugier@teclib.com>
  • Loading branch information
btry committed Jul 6, 2020
1 parent 5963666 commit 062d10e
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions inc/targetbase.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -1044,17 +1044,23 @@ function change_tag_type() {
// Specific tags
echo '<div id="tag_specific_value" style="display: none">';

$dbUtils = new DbUtils();
$entityRestrict = $dbUtils->getEntitiesRestrictCriteria(PluginTagTag::getTable(), "", "", true, false);
if (count($entityRestrict)) {
$entityRestrict = [$entityRestrict];
}
$result = $DB->request([
'SELECT' => ['id', 'name'],
'FROM' => PluginTagTag::getTable(),
'WHERE' => [
'AND' => [
'OR' => [
['type_menu' => ['LIKE', '%"' . $this->getTargetItemtypeName() . '"%']],
['type_menu' => ['LIKE', '%"0"%']]
['type_menu' => ['LIKE', '%"0"%']],
['type_menu' => ''],
['type_menu' => 'NULL'],
],
getEntitiesRestrictCriteria(PluginTagTag::getTable()),
]
] + $entityRestrict,
]
]);
$values = [];
Expand Down

0 comments on commit 062d10e

Please sign in to comment.