How to fetch the Type ID in the javascript files

English! place to talk about development, programming and coding
Post Reply
flippertom
Znuny advanced
Posts: 120
Joined: 16 Apr 2015, 08:42
Znuny Version: 3.2.16

How to fetch the Type ID in the javascript files

Post by flippertom »

Hello,

We are using OTRS 5.
We're doing some customization in the javascript files.
$('#TypeID').val() can be used to fetch the ticket type for the AgentTicketPhone page but it does not get the ticket type on the AgentTicketClose or AgentTicketCompose page.
How to fetch the ticket type for such pages in the javascript file?

Regards,
Tom.
zzz
Znuny superhero
Posts: 888
Joined: 15 Dec 2016, 15:13
Znuny Version: All
Real Name: Emin
Company: Efflux GmbH
Contact:

Re: How to fetch the Type ID in the javascript files

Post by zzz »

Hello Tim,

You can't do that in AgentTicketCompose with JavaScript only.
You'll have to add the TicketType to the AgentTicketClose form. The setting is called 'Ticket::Frontend::AgentTicketClose###TicketType' in v6.

There could also be an additional way with AJAX, but that will require some JS skills.

Best regards
Emin
Professional OTRS, Znuny & OTOBO services: efflux.de | efflux.de/en/

Free and premium add-ons: German | English
Post Reply