How to customize (via javascript) an AgentTicketFreeText with conditions on the ticket queue

English! place to talk about development, programming and coding
Post Reply
vincentb
Znuny newbie
Posts: 12
Joined: 30 Jan 2021, 07:51
Znuny Version: 6 community
Real Name: Vincent B.

How to customize (via javascript) an AgentTicketFreeText with conditions on the ticket queue

Post by vincentb »

Hello,

I want to customize the AgentTicketFreeText form contents/appearence with variations being based on the current ticket queue.

I have a custom AgentTicketActionCommon.tt (in /opt/otrs/Custom/Kernel/Output/HTML/Templates/Standard/AgentTicketActionCommon.tt) and I know I can add something like:

Code: Select all

[% WRAPPER JSOnDocumentComplete %]
<script type="text/javascript">
function changethings() {
        [...this javascript code changes things...]
    }
changethings();
</script>
This works. But now, I want to implement conditional variations depending on the current ticket queue (for example some field label could be set to such or such value depending on the queue).

How can I capture the queue name or ID in my javascript function to use it as I want for implementing conditional stuff?

Thanks!
Post Reply