How to make a custom field mandatory?

Moderator: crythias

Locked
cvieira
Znuny newbie
Posts: 5
Joined: 07 Sep 2012, 20:29
Znuny Version: 3.1.10
Company: Dr. Campos Costa

How to make a custom field mandatory?

Post by cvieira »

Hello!

I'm using OTRS 3.1.10 and I would like to make some "custom fields" as mandatory, cause I want to let users changing a ticket state only if that field is filled/changed. Is it possible?

Thanks.
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: How to make a custom field mandatory?

Post by crythias »

You can make dynamic fields mandatory in the same place you make them visible within SysConfig.
You can use ACLs to provide possible values based upon values of other fields.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
cvieira
Znuny newbie
Posts: 5
Joined: 07 Sep 2012, 20:29
Znuny Version: 3.1.10
Company: Dr. Campos Costa

Re: How to make a custom field mandatory?

Post by cvieira »

I think I didn't explain properly what I actually need.
It isn't the "Free Text" I want to make mandatory, but the "Service" and "Service Type" default fields in the "Free Fields" form, for which I can't find any settings. Is this possible?

PS: The only fields I see that is possible to define are the "Free Text" ones [Frontend::Agent::Ticket::ViewFreeText]. Please see the images attached.
You do not have the required permissions to view the files attached to this post.
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: How to make a custom field mandatory?

Post by crythias »

the "Service" and "TicketType" default fields in the "Free Fields" form are a yes/no enable on the screen (Default yes). If you want to make it mandatory, you'll need to modify the dtl, specifically the class for the field. As an example, set a dynamic field to mandatory and "View Source" or "Inspect Element" on the page to get a hint on what makes the dynamic field "mandatory"
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
cvieira
Znuny newbie
Posts: 5
Joined: 07 Sep 2012, 20:29
Znuny Version: 3.1.10
Company: Dr. Campos Costa

Re: How to make a custom field mandatory?

Post by cvieira »

I've tryed your suggestion but nothing appened. What I did was:

--> checked browser with "View Source" for "mandatory tags"
--> cp /opt/otrs/Kernel/Output/HTML/Standard/AgentTicketFreeText.dtl /opt/otrs/Kernel/Output/HTML/Standard/AgentTicketFreeText.dtl.old
--> vim /opt/otrs/Kernel/Output/HTML/Standard/AgentTicketFreeText.dtl
[because of "$Include{"AgentTicketActionCommon"}"]
--> vim /opt/otrs/Kernel/Output/HTML/Standard/AgentTicketActionCommon.dtl
--> changed the line with "<label for="ServiceID">$Text{"Service"}:</label>" to "<label class="Mandatory" for="ServiceID">$Text{"Service"}:</label>"
--> system reboot

Well, does OTRS have a setting for making this two fields mandatory?
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: How to make a custom field mandatory?

Post by crythias »

cvieira wrote:Well, does OTRS have a setting for making this two fields mandatory?
No. Or else I would have told you to do that.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
Locked