Ticket required fields customization (help with)

Moderator: crythias

Locked
QAGZZZ
Znuny newbie
Posts: 5
Joined: 13 Sep 2011, 19:46
Znuny Version: 2.4

Ticket required fields customization (help with)

Post by QAGZZZ »

Hello everyone!

I find myself a bit at a loss at doing 2 things with the ticket fields. First of all I would like to make mandatory, or required, the 'working hours' field, because people tend to omit it.

The 2nd thing is that, though the CUSTOMER field is required, people can input anything like 'asfasd' into it and OTRS will happily accept it. I was wondering if there is a way to enforce that that field's input matches exactly with one of the customers of the customers list.

Grateful in advance,
QAGZZZ

-using OTRS 3.0.1 -
jfberni
Znuny newbie
Posts: 17
Joined: 03 Mar 2011, 16:51
Znuny Version: 3.0

Re: Ticket required fields customization (help with)

Post by jfberni »

QAGZZZ, May i help you ?

For your first question : you may identify your page you want to modify ex: index.pl?Action=AgentTicketPhone is equal to AgentTicketPhone.dtl


You find this fill on /otrs/Kernel/Output/HTML/Standard

you will have this section on AgentTicketPhone.dtl :
<!-- dtl:block:TimeUnitsLabel -->
<label for="TimeUnits">$Text{"Time units"}$Text{"$Config{"Ticket::Frontend::TimeUnits"}"}:</label>
<!-- dtl:block:TimeUnitsLabel -->

Changed it by :

<!-- dtl:block:TimeUnitsLabel -->
<label class="Mandatory" for="TimeUnits"><span class="Marker">*</span> $Text{"Time units"}$Text{"$Config{"Ticket::Frontend::TimeUnits"}"}:/label>
<!-- dtl:block:TimeUnitsLabel -->

Hopefully it will help you.

JF
QAGZZZ
Znuny newbie
Posts: 5
Joined: 13 Sep 2011, 19:46
Znuny Version: 2.4

Re: Ticket required fields customization (help with)

Post by QAGZZZ »

Unfortunately i changed it as indicated but to no avail. I am still able to create tickets without the need to input anything on the work units field.

Maybe if enforcing this through the DB? I'd rather not go so untidy.

Thanks anyway.
jfberni
Znuny newbie
Posts: 17
Joined: 03 Mar 2011, 16:51
Znuny Version: 3.0

Re: Ticket required fields customization (help with)

Post by jfberni »

Hi QAGZZZ,

Could you tell me if on your .dtl section what you have on those section ?

<!-- dtl:block:TimeUnits -->
<!-- dtl:block:TimeUnits -->

Thanks

JF
QAGZZZ
Znuny newbie
Posts: 5
Joined: 13 Sep 2011, 19:46
Znuny Version: 2.4

Re: Ticket required fields customization (help with)

Post by QAGZZZ »

JF, pleased to paste it here for you, plus the labels.

<!-- dtl:block:TimeUnitsLabel -->
<label class="Mandatory" for="TimeUnits"><span class="Marker">*</span>$Text{"Time units"}$Text{"$Config{"Ticket::Frontend::TimeUnits"}"}:</label>
<!-- dtl:block:TimeUnitsLabel -->

<!-- dtl:block:TimeUnitsLabelMandatory -->
<label class="Mandatory" for="TimeUnits"><span class="Marker">*</span>$Text{"Time units"}$Text{"$Config{"Ticket::Frontend::TimeUnits"}"}:</label>
<!-- dtl:block:TimeUnitsLabelMandatory -->

<!-- dtl:block:TimeUnits -->
<div class="Field">
<input type="text" class="W25pc Validate_TimeUnits $QData{"TimeUnitsRequired"} $QData{"TimeUnitsInvalid"}" name="TimeUnits" id="TimeUnits" value="$QData{"TimeUnits"}" />
<div id="TimeUnitsError" class="TooltipErrorMessage"><p>$Text{"Invalid time!"}</p></div>
<div id="TimeUnitsServerError" class="TooltipErrorMessage"><p>$Text{"This field is required."}</p></div>
</div>
<div class="Clear"></div>
<!-- dtl:block:TimeUnits -->

Thanks! QAGZZZ
Locked