Dynamic Field set to required for certain customer on AgentTicketEmail

Moderator: crythias

Locked
hcassidy
Znuny newbie
Posts: 12
Joined: 02 Mar 2016, 15:00
Znuny Version: OTRS5

Dynamic Field set to required for certain customer on AgentTicketEmail

Post by hcassidy »

Hi, I'm quite new to OTRS

I'm wanting to set up a dynamic field on AgentTicketEmail so that a field is set to required when a certain customerID is inputed into the ticket. The reason is that we have many customers but only a few of those are resellers, we need to have a "subcustomer" field so that we can run reports on accounted time for those customers. I have set up a dynamic field already but not made it a required field as this isn't needed if the customer isn't a reseller.

Is it possible to make it required only for certain customers or will I have to just keep it a non-required field?

thanks
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: Dynamic Field set to required for certain customer on AgentTicketEmail

Post by reneeb »

This needs some development. For simple specific cases like this, a few lines of JavaScript should to the trick. Search this form for show/hide dynamic fields for certain queues...
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
hcassidy
Znuny newbie
Posts: 12
Joined: 02 Mar 2016, 15:00
Znuny Version: OTRS5

Re: Dynamic Field set to required for certain customer on AgentTicketEmail

Post by hcassidy »

Thanks reneeb

We're using queues for agents and not for customer as it is easier to generate accounted time per agent reports this way (we only have 6 agents and we have 200+ customers)

I'll look through the forum though :)
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: Dynamic Field set to required for certain customer on AgentTicketEmail

Post by reneeb »

You should search for that thread because it is a good start for your JavaScript code. You have to replace the queue stuff with customer id field stuff...
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
hcassidy
Znuny newbie
Posts: 12
Joined: 02 Mar 2016, 15:00
Znuny Version: OTRS5

Re: Dynamic Field set to required for certain customer on AgentTicketEmail

Post by hcassidy »

thanks!
Locked