You are not logged in.

Announcement

 Téléchargez la dernière version stable de GLPI      -     Et vous, que pouvez vous faire pour le projet GLPI ? :  Contribuer
 Download last stable version of GLPI                      -     What can you do for GLPI ? :  Contribute

#1 2025-01-07 17:21:43

RingiBoy
Member
Registered: 2025-01-07
Posts: 5

FormCreator conditions for generet ticket not work

Hello!
I decided to use a free wonderful plugin, and everything seems clear there, but there is a question with the rules for creating one of the Targets. What I did:
I created a form and described all the fields (some of the fields appear due to conditions, if the checkbox is checked, the field appears and all this works, - the field really appears), but the problem is with adding a condition for generating the second Target, I set the condition that if the field is equal to the value
yes then it should generate (one single rule):

Generated unless:   AND 'nameQuestion' = valueQuestion_checkbox 

But in fact, it always generates for me, even if the checkbox is inactive. sad

if I set the check for an empty field via a regular expression as empty

Disabled unless:   AND 'nameQuestion' regular expression matches /^\s*$/  

  , - it also does not work.

Maybe I missed something, maybe someone created it and you got it, then give your example, because this looks like a bug. I did not find documentation with an example.

Last edited by RingiBoy (2025-01-07 17:41:26)


GLPI 10.0.16:: Oracle Linux:: Percona mySQL

Offline

#2 2025-01-07 17:24:38

RingiBoy
Member
Registered: 2025-01-07
Posts: 5

Re: FormCreator conditions for generet ticket not work

Let me clarify: My task is to, if the field with the checkbox is not selected, then do not generate the target


GLPI 10.0.16:: Oracle Linux:: Percona mySQL

Offline

#3 2025-01-07 18:44:50

btry
Moderator
Registered: 2015-10-01
Posts: 607

Re: FormCreator conditions for generet ticket not work

Hi

The value to specify is the text of one of the possible values of the checkbox. You must use the same case.

Maybe there is a bug. Do you have special characters (accented or not latin ones) ?

Could you provide a way to reproduce ?


No support with MP - Always run an upgrade task on a testing instance before running it on production! Always backup before any upgrade task!

Offline

#4 Yesterday 11:58:18

RingiBoy
Member
Registered: 2025-01-07
Posts: 5

Re: FormCreator conditions for generet ticket not work

Hello smile

James wrote:

Could you provide a way to reproduce ?

Step 1: create a form/create two questions
1.1 First field with the value "Yes" and the checkbox type (hereinafter field 1)
1.2 Second field text (hereinafter field 2)
Step 2: Create a condition for field 2: if field 1 = Yes, then hide.
Step 3: Check that the condition is true and the system reads correctly, the field is hidden for me (done, it`s work)
Step 4: Create a Target in the form of a task, leave everything by default in the settingst:
4.1 Set the condition for generating the task as follows:
if field 1 = Yes, then generate.

When I tested, whether I excluded the checkbox or not, the task was always generated, i.e. the condition did not work.!
Investigating the problem, I opened the task and there was no data received from the form, the value Yes, i.e. the requirement in the rule does not work for some reason.


GLPI 10.0.16:: Oracle Linux:: Percona mySQL

Offline

#5 Yesterday 13:41:54

LaDenrée
HELPER
Registered: 2012-11-19
Posts: 6,307

Re: FormCreator conditions for generet ticket not work

did you try  "checkbox is visible"  as a condition ?


Trouver la panne avant de réparer...
GLPI10.0.16 (ubuntu 22.04 PHP8.1  Mariadb10.6 ) plugins : comportements 2.7.3 reports 1.16.0 formcreator 2.13.9, datainjection 2.13.5 fields 1.21.9

Offline

#6 Yesterday 14:42:37

RingiBoy
Member
Registered: 2025-01-07
Posts: 5

Re: FormCreator conditions for generet ticket not work

LaDenrée wrote:

did you try  "checkbox is visible"  as a condition ?

no, I'll try now, but does it work without any value being passed?


added:
I tried it and it doesn't work, but there is a possibility that I don't understand how to use it correctly!? (there is little information in the official instructions.

Last edited by RingiBoy (Yesterday 15:13:34)


GLPI 10.0.16:: Oracle Linux:: Percona mySQL

Offline

#7 Yesterday 14:46:18

RingiBoy
Member
Registered: 2025-01-07
Posts: 5

Re: FormCreator conditions for generet ticket not work

I thought this type of check is used for those fields that are visible or hidden, and if we reason in this context, then it will not work as a trigger, because this field is always visible.


GLPI 10.0.16:: Oracle Linux:: Percona mySQL

Offline

Board footer

Powered by FluxBB