Ticket notification change following upgrade to OTRS 6

Moderator: crythias

Locked
esaunders
Znuny newbie
Posts: 26
Joined: 29 Jan 2015, 01:28
Znuny Version: 6.0.x
Real Name: Eric Saunders

Ticket notification change following upgrade to OTRS 6

Post by esaunders »

I am in the process of testing upgrading from OTRS 5 to 6. The Activity Dialog we use to create new tickets includes an Article field to define the Subject (Title) and Body of the ticket as well as a (mandatory) CustomerID field so that Agents can create tickets on behalf of Customers in the Agent portal.

I have defined a Ticket Notification to email relevant Agents when a ticket is created (below). If a Customer completes the Activity Dialog in the Customer interface the Ticket Notification works as expected. However, if an Agent completes the Dialog in the Agent interface, defining a CustomerID, the content of "Description:" in the notification email is "No Body," regardless of what was entered into the Article Text field.

If I change the definition of "Description:" to instead be <OTRS_AGENT_BODY> the the notification works for Agent-submitted tickets, but Customer-submitted tickets now have a "Description:" value of "-". How can I modify the Ticket Notification to return the Body value for both scenarios? Thank you.

Code: Select all

---
- ChangeBy: '35'
  ChangeTime: 2020-09-15 09:32:29
  Comment: ''
  CreateBy: '2'
  CreateTime: 2015-08-05 12:59:18
  Data:
    ArticleAttachmentInclude:
    - '0'
    Events:
    - TicketCreate
    IsVisibleForCustomer:
    - '1'
    LanguageID:
    - en
    QueueID:
    - '6'
    RecipientRoles:
    - '2'
    Search_DynamicField_Status:
    - Queue
    TransportEmailTemplate:
    - Default
    Transports:
    - Email
    VisibleForAgent:
    - '0'
  ID: '8'
  Message:
    en:
      Body: '<span style="font-family:verdana,geneva,sans-serif"><span style="font-size:12px">A
        new <span style="font-family:verdana,geneva,sans-serif"><span style="font-size:12px">&lt;OTRS_TICKET_Queue&gt;
        ticket </span></span>was submitted: &lt;OTRS_TICKET_TicketNumber&gt;<br />

        <br />

        &lt;OTRS_CONFIG_HttpType&gt;://&lt;OTRS_CONFIG_FQDN&gt;/&lt;OTRS_CONFIG_ScriptAlias&gt;index.pl?Action=AgentTicketZoom;TicketID=&lt;OTRS_TICKET_TicketID&gt;<br
        />

        <br />

        <br />

        Subject: &lt;OTRS_TICKET_Title&gt;<br />

        <br />

        Description: &lt;OTRS_CUSTOMER_BODY&gt;<br />

        <br />

        <br />

        Submitter: &lt;OTRS_CUSTOMER_REALNAME&gt;<br />

        Site: &lt;OTRS_TICKET_DynamicField_Site_Value&gt;<br />

        Bldg / Suite: &lt;OTRS_TICKET_DynamicField_BldgSuite_Value&gt;<br />

        Priority: &lt;OTRS_TICKET_Priority&gt;<br />

        Requested Completion Date: &lt;OTRS_TICKET_DynamicField_RequestedCompletionDate_Value&gt;</span></span>'
      ContentType: text/html
      Subject: 'Unex Help Desk Dev: New <OTRS_TICKET_Queue> Ticket Submitted'
  Name: Agent::TicketCreate-CS
  ValidID: '1'
skullz
Znuny superhero
Posts: 658
Joined: 24 Feb 2012, 03:58
Znuny Version: LTS and Features
Real Name: Mo Azfar
Location: Kuala Lumpur, MY
Contact:

Re: Ticket notification change following upgrade to OTRS 6

Post by skullz »

Just use both <OTRS_AGENT_BODY> <OTRS_CUSTOMER_BODY> in the notification.

Or if you really can't live with the "-", tag your ticket first (with dynamic field value) when submitting via agent/customer portal.

For example, by using ACL, if ticket via customer portal, dynamic field channel = Portal
For example, by using ACL, if ticket via agent portal, dynamic field channel = Agent

So, you should have 2 ticket create notification based on the channel.
My Github
OTRS CE/LTS Discord Channel
Cant Update Package Anymore ? Check This

Professional OTRS, Znuny & OTOBO services: efflux.de/en
Free and premium add-ons: English
esaunders
Znuny newbie
Posts: 26
Joined: 29 Jan 2015, 01:28
Znuny Version: 6.0.x
Real Name: Eric Saunders

Re: Ticket notification change following upgrade to OTRS 6

Post by esaunders »

Thank you, skullz. I suspected the solution would involve ACLs and dynamic fields. Implementation won't be difficult, but it is disappointing given the added maintenance overhead of keeping track of why these elements are necessary. Especially considering how the current ticket notification worked intuitively in OTRS 5. I appreciate the prompt response.

Thanks,
+Eric
Locked