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 2022-04-21 10:52:00

julie23
Member
Registered: 2021-10-11
Posts: 57

how to make email mandatory and remove incident ?

Hello,

I did a big job in notification system so i want to be sure that user have all updates. For this i need them to add an email.

So when they are doing a ticket, i would like to make "email" mandatory field.

-
Second thing : i would like to remove "incident" in type. I'm nearly sure this cant be done unless direct code edit but if you can at least tell me which file i have to edit, it will be greatly appreciated
-

Picture here : h*ttps://ibb.co/Ct8SS3Z

Last edited by julie23 (2022-04-21 10:52:21)

Offline

#2 2022-04-21 13:50:08

cconard96
Moderator
Registered: 2018-07-31
Posts: 2,819
Website

Re: how to make email mandatory and remove incident ?

Please have a look into Ticket Templates to define mandatory and pre-defined fields.

https://glpi-user-documentation.readthe … -templates

They can be accessed by a button at the top of the Tickets page. You can then assign templates by entity, profile or specific user to customize their ticket creation forms.

For setting a default template for a profile:

https://glpi-user-documentation.readthe … ermissions


GLPI Collaborator and Plugin Developer.
My non-English comments are automated translations. Sorry for any confusion that causes.
Mes commentaires non anglais sont des traductions automatiques. Désolé pour toute confusion qui cause.
Mis comentarios que no están en inglés son traducciones automáticas. Perdón por cualquier confusión que cause.

Offline

#3 2022-04-21 22:29:31

julie23
Member
Registered: 2021-10-11
Posts: 57

Re: how to make email mandatory and remove incident ?

cconard96 wrote:

Please have a look into Ticket Templates to define mandatory and pre-defined fields.

h*ttps://glpi-user-documentation.readthedocs.io/fr/latest/modules/overview/templates.html#ticket-templates

They can be accessed by a button at the top of the Tickets page. You can then assign templates by entity, profile or specific user to customize their ticket creation forms.

For setting a default template for a profile:

h*ttps://glpi-user-documentation.readthedocs.io/fr/latest/modules/administration/profiles/assistancetab.html#associations-permissions

Mmm i don't understand. My question is to remove Incident (from the field where you have Incident and request). The other question is to make email mandatory when a ticket is submited.

I did a lot in mandatory field but email isnt there. Same about removing incident i don't see a way without doing custome code

Am i wrong ? (i use glpi 9.5 )

Last edited by julie23 (2022-04-21 22:32:47)

Offline

#4 2022-04-21 23:37:34

WebGreg
Member
Registered: 2020-02-27
Posts: 740

Re: how to make email mandatory and remove incident ?

In my opinion you cannot. But you can do a workaround. Business rules for tickets (front/ruleticket.php) and set - if category .... than action set type as request.


--
GLPI 10.0.17
GLPI-Inventory 1.4.0
Ubuntu Server 20.04 LTS

Offline

#5 2022-04-22 11:51:11

julie23
Member
Registered: 2021-10-11
Posts: 57

Re: how to make email mandatory and remove incident ?

WebGreg wrote:

In my opinion you cannot. But you can do a workaround. Business rules for tickets (front/ruleticket.php) and set - if category .... than action set type as request.

But with this it will be still selectable (i think ?). Actually the best thing i found is to force the field to select request as defaut... but if you click agan , "incident" is still there...

Isnt it possible to // some line of code ?

Btw what about email mandatory in ticket ?

Offline

#6 2022-04-22 12:21:50

julie23
Member
Registered: 2021-10-11
Posts: 57

Re: how to make email mandatory and remove incident ?

Ok i found about my first question :

//         self::INCIDENT_TYPE => __('Incident')

line 3321 in ticket.class.php

-

I guess it's possible to put somethiing like "is mandatory" to make email mandatory ? Anyone to help on this ? sad

Offline

#7 2022-04-22 16:38:07

WebGreg
Member
Registered: 2020-02-27
Posts: 740

Re: how to make email mandatory and remove incident ?

No, if the category is mandatory and you do not allow the incident. Or otherwise - yes, but the user has to select a category that will change on request.
The rule sets the type after the user sends the ticket, so even if it sends as an incident - the ticket will be registered as request.

Changing the source is a bad idea IMO.

Last edited by WebGreg (2022-04-22 16:39:06)


--
GLPI 10.0.17
GLPI-Inventory 1.4.0
Ubuntu Server 20.04 LTS

Offline

#8 2022-04-25 01:12:46

cconard96
Moderator
Registered: 2018-07-31
Posts: 2,819
Website

Re: how to make email mandatory and remove incident ?

My comment was implying that you could make the type predefined to be "Incident" and also make it a hidden field. That should make them all incidents.

I am not sure what field you are referring to as "Email".


GLPI Collaborator and Plugin Developer.
My non-English comments are automated translations. Sorry for any confusion that causes.
Mes commentaires non anglais sont des traductions automatiques. Désolé pour toute confusion qui cause.
Mis comentarios que no están en inglés son traducciones automáticas. Perdón por cualquier confusión que cause.

Offline

#9 2022-04-25 08:00:50

WebGreg
Member
Registered: 2020-02-27
Posts: 740

Re: how to make email mandatory and remove incident ?

cconard96 wrote:

My comment was implying that you could make the type predefined to be "Incident" and also make it a hidden field. That should make them all incidents.

Are you sure about that? I don't see the type in the hidden fields.


--
GLPI 10.0.17
GLPI-Inventory 1.4.0
Ubuntu Server 20.04 LTS

Offline

#10 2022-04-26 02:23:11

cconard96
Moderator
Registered: 2018-07-31
Posts: 2,819
Website

Re: how to make email mandatory and remove incident ?

Indeed, I thought it was there but I double checked now and it is not.


GLPI Collaborator and Plugin Developer.
My non-English comments are automated translations. Sorry for any confusion that causes.
Mes commentaires non anglais sont des traductions automatiques. Désolé pour toute confusion qui cause.
Mis comentarios que no están en inglés son traducciones automáticas. Perdón por cualquier confusión que cause.

Offline

Board footer

Powered by FluxBB