Skip to content

Commit 7c3f451

Browse files
committed
fix(tags): bad tag filter when selecting tags for target ticket
1 parent 5eae51c commit 7c3f451

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

inc/targetbase.class.php

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -976,10 +976,13 @@ function change_tag_type() {
976976
'SELECT' => ['name'],
977977
'FROM' => PluginTagTag::getTable(),
978978
'WHERE' => [
979-
'OR' => [
980-
['type_menu' => ['LIKE', $this->getTargetItemtypeName()]],
981-
['type_menu' => ['LIKE', '0']],
982-
] + getEntitiesRestrictCriteria(PluginTagTag::getTable())
979+
'AND' => [
980+
'OR' => [
981+
['type_menu' => ['LIKE', '%"' . $this->getTargetItemtypeName() . '"%']],
982+
['type_menu' => ['LIKE', '%"0"%']]
983+
],
984+
getEntitiesRestrictCriteria(PluginTagTag::getTable()),
985+
]
983986
]
984987
]);
985988
$values = [];

0 commit comments

Comments
 (0)