znuny / znuny-feature-requests

This repository tracks feature requests as issues.
7 stars 1 forks source link

Feature request: Automatic transfer of the ticket title to the note heading #6

Open schnudd31do3 opened 2 years ago

schnudd31do3 commented 2 years ago

@rkaldung: https://github.com/znuny/Znuny/pull/195

Proposed change

When one create a note, either a fixed value is used or the heading is empty. With this extension, the subject line can also be automatically inserted into the note heading. The previous functionality is not changed.

In order to use this, the value "[% Data.Title %]" must be entered ​​in the sysconfig in the following settings:

To achieve this, three places in the source code need to be expanded with "Data => \%Ticket," in https://github.com/znuny/Znuny/blob/dev/Kernel/Modules/AgentTicketActionCommon.pm.

Insert near line 1069:

`

            if ( $Config->{Subject} ) {
                my $Subject = $LayoutObject->Output(
                    Template => $Config->{Subject},
                    Data => \%Ticket,
                );
                $GetParam{Subject} = $Subject;
            }

` and near line 1654:

`

    elsif ( !defined $GetParam{Subject} && $Config->{Subject} ) {
        $GetParam{Subject} = $LayoutObject->Output(
          Template => $Config->{Subject},
          Data => \%Ticket,
        );

`

Edit: I also found a solution for PhoneInbound and PhoneOutbound Insert "[% Data.Title %]" in Ticket::Frontend::AgentTicketPhoneInbound###Subject Ticket::Frontend::AgentTicketPhoneOutbound###Subject

Mosdify https://github.com/znuny/Znuny/blob/dev/Kernel/Modules/AgentTicketPhoneCommon.pm Line 376 from Template => $Config->{Subject} || '', to Template => $Config->{Subject} || '',Data => \%Ticket,

Type of change