Auto set TicketFreeText<n> to specific value - hidden?

Moderator: crythias

Locked
shostakovich
Znuny advanced
Posts: 146
Joined: 11 Apr 2011, 08:11
Znuny Version: 3.2.5

Auto set TicketFreeText<n> to specific value - hidden?

Post by shostakovich »

The problem is, TicketFreeText<n> default values in Sysconfig do not apply, if TicketFreeText<n> is not available in e.g. AgentTicketEmail/Phone -> values are not set then. Even if I attach ";TicketFreeText5=1' to the html command line, the value is not set.

I want to set TicketFreeText5 without the user seeing it. I was thinking about hidden elements on the form, so I added

Code: Select all

<input type="hidden" name="TicketFreeText5" value="1"/>
to AgentTicketEmail.dtl line 42, but this does not set the value.

Underlying problem is, I want to prevent OTRS to send event based notification mails when the Agent uses "New E-Mail Ticket". I could resolve it with a TicketFreeText trigger. BUT if the value is not set at all, I cannot trigger this in Action=AdminNotificationEvent

EDIT. Hmm, maybe I have to set the value in AgentTicketEmail.pm/AgentTicketPhone.pm?

TIA
shostakovich
Znuny advanced
Posts: 146
Joined: 11 Apr 2011, 08:11
Znuny Version: 3.2.5

Re: Auto set TicketFreeText<n> to specific value - hidden?

Post by shostakovich »

Strange. I'm convinced, if I set

Code: Select all

$Self->{TicketObject}->TicketFreeTextSet(
                    TicketID => $TicketID,
                    Key      => 'automail',
                    Value    => 'yes',
                    Counter  => 5,
                    UserID   => $Self->{UserID},
                );
after the for loop (at around line 929)

Code: Select all

       # set ticket free text
        for my $Count ( 1 .. 16 ) {
in AgentTicketPhone.pm, it must set the TicketFreeText5 with key "automail" and value "yes" - but it does not.
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Auto set TicketFreeText<n> to specific value - hidden?

Post by crythias »

<input type="hidden" name="TicketFreeKey5" value="automail"/>
<input type="hidden" name="TicketFreeText5" value="yes"/>
This should work, but you might need to enable it in Sysconfig.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
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
Locked