CustomerID in Ticket Create

Moderator: crythias

Locked
aolgin
Znuny newbie
Posts: 21
Joined: 03 Jun 2013, 17:44
Znuny Version: 3.2.7

CustomerID in Ticket Create

Post by aolgin »

Some of our users are asking for the ability to select the CustomerID from a list when creating a ticket, and it will assign that CustomerID to that ticket. For us, CustomerID=Location, and some Customers move around locations. I was able to create a dynamic field drop down for tickets containing all the potential CustomerIDs and was able to put it on the Ticket Creation form.

The issue I am running into is to actually have it change the CustomerID of the ticket. I assume it has to do with the syntax of it. For the Key, I put the actual CustomerID, and for the Value I put what I want them to see.

Suggestions as to how to make this actually take effect, rather than just create an additional value that doesn't do anything?



OTRS 3.2.8 installed on a Windows 2008 Server.
aolgin
Znuny newbie
Posts: 21
Joined: 03 Jun 2013, 17:44
Znuny Version: 3.2.7

Re: CustomerID in Ticket Create

Post by aolgin »

I've decided to opt for just using dynamic fields to create an additional value, and that will work out fine. We didn't think the changing CustomerID with each ticket thing through.

Anyways, it works fine, but there is one last feature that we want to have, and then we'll be fully satisfied with the system. I would like to make it so upon entering a ticket creation screen for a customer, this dropdown menu looks to the CustomerID of the customer and sets the default value of the Dynamic Field to that. I've been looking in Kernel\System\DynamicField\Backend\Dropdown.pm and Kernel\Modules\AdminDynamicFieldDropdown.pm for the function that sets the default.

Essentially I would like to disable their function that picks a default value and write a new function to replace it that will compare the CustomerID of the Customer to the dropdown, find a matching value, and set the default to that value. I have very limited perl knowledge, so this is proving difficult for me.

Can anyone point me in the right direction, or offer up some code or link to another article that mentions something similar to this?
Locked