new phone ticket: dynamic field depending on customer user attribute

Moderator: crythias

Locked
pebeITS
Znuny newbie
Posts: 29
Joined: 26 Jul 2012, 22:16
Znuny Version: 5.0.5

new phone ticket: dynamic field depending on customer user attribute

Post by pebeITS »

Hi everybody,

I have an extern CustomerUser-MySQL-Database; within this DB there is an field called "authorized_support".
When creating a new phone-ticket, the value of this field should control if an additional dynamic field is shown in the dialogue or not.

if authorized_support = 0 then show field
if authorized_support = 1 then hide field

Next step would be to fill in the dynamic field with values from the customeruser-DB ("select * from customeruser where customerno = 123* and authorized_support = 1)

* = customer-number of selected customer

Any idea how to solve this?

regards
reneeb
Znuny guru
Posts: 5018
Joined: 13 Mar 2011, 09:54
Znuny Version: 6.0.x
Real Name: Renée Bäcker
Company: Perl-Services.de
Contact:

Re: new phone ticket: dynamic field depending on customer user attribute

Post by reneeb »

This would need some development (untested):

* Create a new Kernel/Modules/Agent*.pm that does the selection and retuns the possible values for a given customer id and customer user
* You can "Subscribe" to the event that is fired when the ticket customer is set and so a request to your new module and show the values
Perl / Znuny development: http://perl-services.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
Locked