Kludge to assign a State to a Response Template

Dont create your support topics here! No new topics with questions allowed!

Moderator: crythias

Post Reply
User avatar
crythias
Moderator
Posts: 9981
Joined: 04 May 2010, 18:38
OTRS Version?: 5.0.x
Location: SouthWest Florida, USA
Contact:

Kludge to assign a State to a Response Template

Post by crythias » 08 Feb 2018, 02:52

In ArticleActionMenu.tt

Around line 100, you can find the following, which you can just add if/then:

Code: Select all

    if ($(this).val() > 0) {
        URL = Core.Config.Get('Baselink') + $(this).parents().serialize();
        if ($(this).val() == 3) {
           URL = URL + '&StateID=7';
           }
        window.setTimeout(function() {
Basically, if the response template ID is 3, the StateID will be 7.
OTRS 5.0.x (private/testing/public) on Linux with MySQL database. Also on github.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask

tpsupport
OTRS expert
Posts: 53
Joined: 02 Feb 2011, 14:45
OTRS Version?: 6.0.8

Re: Kludge to assign a State to a Response Template

Post by tpsupport » 06 Jun 2018, 16:18

Hi crythias,

This is what I was looking for! Unfortnately this modification seems to only work for OTRS 5. Can it be adopted for OTRS 6 as well and how?
Javascript has been removed from templates in OTRS, see https://blog.otrs.com/2017/03/21/no-jav ... -tt-files/.

Thanks!
OTRS 6 - Ubuntu 16.04 x64, Azure Database for MySQL server 5.7, Perl 5.22.1, Apache/2.4.18

Post Reply