Code of Conduct
Is there an existing issue for this?
GLPI Version
11.0.2
Plugin version
1.23.0
Bug description
When adding a Yes/No field as mandatory in a ticket form, the default value is set to No. However, if the user leaves the field as No, the form validation fails, and the ticket cannot be submitted. The mandatory check only works when the value is changed to Yes.
This means the mandatory field logic does not work correctly for Yes/No fields, as the default value "No" should be considered valid when the field is required.
Steps To reproduce
- Go to Fields plugin configuration.
- Add a new field of type Yes/No.
- Set the field as mandatory.
- Assign it to a ticket form.
- Create a new ticket and leave the field as No (default value).
- Try to submit the ticket.