Customer Portal - New Ticket Default Values

Moderator: crythias

Locked
Gunz
Znuny newbie
Posts: 44
Joined: 30 Jun 2010, 01:43
Znuny Version: 2.4

Customer Portal - New Ticket Default Values

Post by Gunz »

Hi, this quesiton has been asked before however I didn't understand the answers that were given. I'm hoping there's a straight forward, easy way to achieve this :D

When a customer uses the Customer Portal to open a new ticket, I'd like to add default values in the "Type" and "To" drop down options rather than the current "-". This should make this form a little more user friendly.

Is there an easy way to do this?

Thanks in advance!
Gunz
Znuny newbie
Posts: 44
Joined: 30 Jun 2010, 01:43
Znuny Version: 2.4

Re: Customer Portal - New Ticket Default Values

Post by Gunz »

bump... anyone? I would really appreciate some assistance with this...

Thanks Wayne
Mothra
Znuny expert
Posts: 189
Joined: 26 Oct 2010, 15:04
Znuny Version: 3.2.11

Re: Customer Portal - New Ticket Default Values

Post by Mothra »

The most straighforward and easy way is the one already described - tell me which particular part you did not follow and I'll see if I can help.
OTRS 3.2.11 on Centos 6.4 with MySQL 5.0. Agents and internal customers authenticate via Active Directory.
Gunz
Znuny newbie
Posts: 44
Joined: 30 Jun 2010, 01:43
Znuny Version: 2.4

Re: Customer Portal - New Ticket Default Values

Post by Gunz »

I didn't understand any of it to be honest.

However, I thought I would try to use the input type="hidden" option that Crythias proposed.

I only have one queue set up - IT Assistance. When customers create a new ticket using the Customer panel, new ticket option, I want all tickets to go to this queue (i.e."IT Assistance").

In the CustomerTicketMessage.dtl I replaced this code:

<tr>
<td width="15%" class="contentkey">$Text{"To"}:</td>
<td width="85%" class="contentvalue">
$Data{"ToStrg"}
<font color="red" size="-2">$Text{"$Data{"Queue invalid"}"}</font> </td>
</tr>

with...

<tr>
<input type="hidden" name="ToStrg" value="IT Assistance"/>
</tr>


And it didn't work. :(

Could anyone give me the correct code syntax to hide the option but default the value to "IT Assistance"???
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Customer Portal - New Ticket Default Values

Post by crythias »

I knew I did this before ... http://forums.otrs.org/viewtopic.php?f=62&t=4830#p25069

Render the HTML to get the code.

don't forget <td> in HTML but you don't need it.

Edit Config Settings in Ticket -> Frontend::Customer::Ticket::ViewNew
CustomerPanelOwnSelection

At least this reduces the drop down.

CustomerGroups also reduce the queues available, but on a permissions level.

and then if you want to force it in the .dtl ...

This is the relevant part of "View Source" of the customer.pl new ticket page:
<select name="Dest" id="Dest" class="Validate_RequiredDropdown " >
<option value="||-">-</option>
<option value="3||Junk">Junk</option>
<option value="4||Misc">Misc</option>
<option value="1||Postmaster">Postmaster</option>
<option value="2||Raw">Raw</option>
</select>

It appears "Dest" is the "To" and the values ... So replace
<tr>
<td width="15%" class="contentkey">$Text{"To"}:</td>
<td width="85%" class="contentvalue">
$Data{"ToStrg"}
<font color="red" size="-2">$Text{"$Data{"Queue invalid"}"}</font> </td>
</tr>

with
<tr><td><input type="hidden" name="Dest" value="2||Raw" /></td><td>&nbps;</td></tr>

I haven't tried it, but it appears to me that the 2|| is redundant to the QueueName. Don't quote me on this.
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
Gunz
Znuny newbie
Posts: 44
Joined: 30 Jun 2010, 01:43
Znuny Version: 2.4

Re: Customer Portal - New Ticket Default Values

Post by Gunz »

Crythias,

Thank you for the detailed answer. I REALLY appreciate the effort to which you've gone in assisting me with this issue.

Cheers!
Wayne
Locked