Skip to content

Commit

Permalink
fix(targetticket,targetchange): cannot use dropdown type questions to…
Browse files Browse the repository at this point in the history
… set entity, category

Signed-off-by: Thierry Bugier <tbugier@teclib.com>
  • Loading branch information
btry committed Jul 23, 2021
1 parent 671fd3c commit de0a303
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions inc/abstracttarget.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -927,7 +927,7 @@ protected function showDestinationEntitySetings($rand) {
$this->getForm()->getID(),
[
'fieldtype' => ['glpiselect'],
'values' => User::class,
'values' => ['LIKE', '%"itemtype":"' . User::class . '"%'],
],
'_destination_entity_value_user',
$this->fields['destination_entity_value']
Expand All @@ -939,7 +939,7 @@ protected function showDestinationEntitySetings($rand) {
$this->getForm()->getID(),
[
'fieldtype' => ['glpiselect'],
'values' => Entity::class,
'values' => ['LIKE', '%"itemtype":"' . Entity::class . '"%'],
],
'_destination_entity_value_entity',
$this->fields['destination_entity_value']
Expand Down Expand Up @@ -1193,6 +1193,7 @@ protected function showCategorySettings($rand) {
$this->getForm()->getID(),
[
'fieldtype' => ['dropdown'],
'values' => ['LIKE', '%"itemtype":"' . ITILCategory::class . '"%'],
],
'_category_question',
$this->fields['category_question']
Expand Down Expand Up @@ -1934,7 +1935,7 @@ protected function showActorSettingsForType($actorType, array $actors) {
'OR' => [
'AND' => [
'fieldtype' => ['glpiselect'],
'values' => User::class,
'values' => ['LIKE', '%"itemtype":"' . User::class . '"%'],
],
[
'fieldtype' => ['email'],
Expand All @@ -1951,7 +1952,7 @@ protected function showActorSettingsForType($actorType, array $actors) {
$this->getForm()->getID(),
[
'fieldtype' => ['glpiselect'],
'values' => Group::class,
'values' => ['LIKE', '%"itemtype":"' . Group::class . '"%'],
],
'actor_value_' . PluginFormcreatorTarget_Actor::ACTOR_TYPE_QUESTION_GROUP,
0
Expand Down Expand Up @@ -2003,7 +2004,7 @@ protected function showActorSettingsForType($actorType, array $actors) {
$this->getForm()->getID(),
[
'fieldtype' => ['glpiselect'],
'values' => Supplier::class,
'values' => ['LIKE', '%"itemtype":"' . Supplier::class . '"%'],
],
'actor_value_' . PluginFormcreatorTarget_Actor::ACTOR_TYPE_QUESTION_SUPPLIER,
0
Expand Down

0 comments on commit de0a303

Please sign in to comment.