[SOLVED] Custom dropdown in NewPhoneTicket
Moderator: crythias
-
- Znuny newbie
- Posts: 83
- Joined: 15 Nov 2013, 15:19
- Znuny Version: 4.0.13
- Real Name: Lubomir
- Company: Expert-M
[SOLVED] Custom dropdown in NewPhoneTicket
I need an additional dropdown field when creating tickets (NewPhoneTicket) . I need to be filled with all the first names of customers which are in the same company.
Lets say i create a ticket and i choose customer with ID -> Company10
I want my field to be filled with all the firstnames for customers with id - > Company10 .
Thanks !
Lets say i create a ticket and i choose customer with ID -> Company10
I want my field to be filled with all the firstnames for customers with id - > Company10 .
Thanks !
Last edited by Lubomirsb on 02 Dec 2013, 14:07, edited 1 time in total.
OTRS 3.3.4 ,Centos 6.5
-
- Moderator
- Posts: 10170
- Joined: 04 May 2010, 18:38
- Znuny Version: 5.0.x
- Location: SouthWest Florida, USA
- Contact:
Re: Custom dropdown in NewPhoneTicket
adapt this: viewtopic.php?f=60&t=17033
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
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
-
- Znuny newbie
- Posts: 83
- Joined: 15 Nov 2013, 15:19
- Znuny Version: 4.0.13
- Real Name: Lubomir
- Company: Expert-M
Re: Custom dropdown in NewPhoneTicket
I did it. Thanks.crythias wrote:adapt this: viewtopic.php?f=60&t=17033
Just 2 questions. How i can use the parameter ? When i try to submit the ticket it says "One or more errors occurred!". Can i save dynamic fields values that are not in the database (like in the example populated with Jquery)
OTRS 3.3.4 ,Centos 6.5
-
- Moderator
- Posts: 10170
- Joined: 04 May 2010, 18:38
- Znuny Version: 5.0.x
- Location: SouthWest Florida, USA
- Contact:
Re: Custom dropdown in NewPhoneTicket
You may not be able to save values that are not in the database. (if this is a select/dropdown).
You can change the type of a text input box to a select (or fuzzy search/autocomplete an inputbox).
How to use the parameter? See autocomplete or, for instance, pass a value from a field as a parameter to a url.
You can change the type of a text input box to a select (or fuzzy search/autocomplete an inputbox).
How to use the parameter? See autocomplete or, for instance, pass a value from a field as a parameter to a url.
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
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
-
- Znuny newbie
- Posts: 83
- Joined: 15 Nov 2013, 15:19
- Znuny Version: 4.0.13
- Real Name: Lubomir
- Company: Expert-M
Re: Custom dropdown in NewPhoneTicket
This solved my problem ! Thanks a lot !crythias wrote:You may not be able to save values that are not in the database. (if this is a select/dropdown).
You can change the type of a text input box to a select (or fuzzy search/autocomplete an inputbox).
How to use the parameter? See autocomplete or, for instance, pass a value from a field as a parameter to a url.
Just one last question , the values are in cyrillic and they look like nothing , its all messed up

Any ideas of how i can fix that ?
OTRS 3.3.4 ,Centos 6.5
-
- Moderator
- Posts: 10170
- Joined: 04 May 2010, 18:38
- Znuny Version: 5.0.x
- Location: SouthWest Florida, USA
- Contact:
Re: Custom dropdown in NewPhoneTicket
I'm not entirely certain how best to address. It seems like there's an encoding problem somewhere... it's difficult to address ...Lubomirsb wrote:Any ideas of how i can fix that?
What assumptions can be made?
The values that are stored in the database are and are supposed to be cyrillic?
Retrieving the values directly from extdata.pl show poorly?
I don't know if, for instance, this makes any sense (utf-8 everywhere) ...
There's a possibility that there's an encoding problem with the extdata.pl ...
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
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
-
- Znuny newbie
- Posts: 83
- Joined: 15 Nov 2013, 15:19
- Znuny Version: 4.0.13
- Real Name: Lubomir
- Company: Expert-M
Re: Custom dropdown in NewPhoneTicket
Thank you very much ! This one helped me !crythias wrote:I'm not entirely certain how best to address. It seems like there's an encoding problem somewhere... it's difficult to address ...Lubomirsb wrote:Any ideas of how i can fix that?
What assumptions can be made?
The values that are stored in the database are and are supposed to be cyrillic?
Retrieving the values directly from extdata.pl show poorly?
I don't know if, for instance, this makes any sense (utf-8 everywhere) ...
There's a possibility that there's an encoding problem with the extdata.pl ...
Now i have other question , i put that dropdown in AgentTicketPhone.dtl but i need it for the customer portal , So i did the same in CustomerTicketMessage.dtl .
The problem is that in that dtl there is no CustomerID , how i can get customerID in that dtl ? Any ideas ?
OTRS 3.3.4 ,Centos 6.5
-
- Moderator
- Posts: 10170
- Joined: 04 May 2010, 18:38
- Znuny Version: 5.0.x
- Location: SouthWest Florida, USA
- Contact:
Re: Custom dropdown in NewPhoneTicket
You might try $QData{UserCustomerID} or modify otrs/Kernel/Modules/CustomerTicketMessage.pm in sub _MaskNew to include (maybe?)
and $QData{myCustomerID} in the .dtl
I can't confirm this will work, but it could... on the other hand, I'd probably rather suggest this get created in the server side as the customer isn't going to change his own CustomerID. This would mean creating your own Block in CustomerTicketMessage.pm that looks this up and presents it, rather than relies on javascript.
Code: Select all
$Param{myCustomerID} = $Self->{UserCustomerID};
I can't confirm this will work, but it could... on the other hand, I'd probably rather suggest this get created in the server side as the customer isn't going to change his own CustomerID. This would mean creating your own Block in CustomerTicketMessage.pm that looks this up and presents it, rather than relies on javascript.
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
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
-
- Znuny newbie
- Posts: 83
- Joined: 15 Nov 2013, 15:19
- Znuny Version: 4.0.13
- Real Name: Lubomir
- Company: Expert-M
Re: Custom dropdown in NewPhoneTicket
Thanks ! This solved my problem !crythias wrote:You might try $QData{UserCustomerID} or modify otrs/Kernel/Modules/CustomerTicketMessage.pm in sub _MaskNew to include (maybe?)
and $QData{myCustomerID} in the .dtlCode: Select all
$Param{myCustomerID} = $Self->{UserCustomerID};
I can't confirm this will work, but it could... on the other hand, I'd probably rather suggest this get created in the server side as the customer isn't going to change his own CustomerID. This would mean creating your own Block in CustomerTicketMessage.pm that looks this up and presents it, rather than relies on javascript.
OTRS 3.3.4 ,Centos 6.5