roberth I'm reluctant to try changing things on my system just now, but will %{ticket.thread.lastmessage.body} do it?

    RBGE Thanks for helping me, but no, that just shows the body of the first-message.

    That definitely doesn't sound right ? I notice that ticket.thread.lastmessage is expanadable beyond that point, and does describe itself as "Last Message" in the popout help. Additionally, you can select the 'Last message' canned response when replying and it selects the last message, exactly as you'd expect...

    It's got me stumped... I'll fire up a clone of my live system and have a quick play around with things shortly to see if I can find what's happening. Hopefully somebody else can come up with an actual answer before then!

      roberth I wouldn't expect osTicket Awesome to cause this issue, although I've just tested it on my clone system and %{ticket.thread.lastmessage} (without the .body part) includes the entirety of the user's last response, including the email header that was above the "-- reply above this line --" part.

      If you're able to set up a clone too, it might be worth setting one up and restoring all of the stock files. If the issue is sorted there, you know the problem is due to osTicket Awesome and can report it on their forum (it's then up to you whether you revert to stock, or stick with the issue until it's fixed). If the problem still occurs with stock files, then there's an issue elsewhere.

      Edit: note that I don't use osTicket Awesome - all of my testing is on the stock version

        RBGE Thanks. I'm using exactly the same field: %{ticket.thread.lastmessage} and just to be sure I just had a look at the Send Items mailbox of our support-mailbox.

        I see that all our replies contain the original question in stead of the users last message. I will first ask the people from osTicket Awesome before setting up clone. See https://osticketawesome.com/forums/topic/ticket-thread-lastmessage-inserts-the-original-message/#post-4788

        I also checked the canned response and that works as expected. The Last Message inserts the last message.
        I will report back when I know more. Thank you.

        @roberth @RBGE

        Tested this on my local and this works for me like it's supposed to. I used both %{ticket.thread.lastmessage} and %{ticket.thread.lastmessage.body} and they both return the correct last message.

        Cheers.

        I just tested it again with a new setup of osTicket and it doesn't work for me.
        Here are the screenshots:

        My Template:

        The test-ticket

        Last reply in Gmail:
        You see that the original question is included. Not the client's last message saying that his "it's fixed now"

        • RBGE replied to this.

          roberth That's odd, as it's definitely working as expected in mine (with apologies for excessive pixelisation!):

          The template:

          The ticket thread:

          The final email received by the user:

          This is a clone of my live system, with no mods and only official plugins (from osticket.com/download) to authenticate with AD and store attachments on the filesystem (so nothing that would modify ticket behaviour). I've honestly no idea where to look just now if yours is behaving strangely on a new install ?

            RBGE Really appreciate the effort.
            Mine is a fresh download with only the Save Attachment to Filesystem plugin. Nothing else.
            I was thinking about the sorting, Maybe it's sorted in the wrong way (last message = first). Maybe our language has something to do with it (localization). Or some language-setting on the database, but the canned response for "Last Message" inserts the correct part of the ticket. It's so strange.

            I sometimes notie that the fields are 'mangled' after editing the template. E.g. url's for "agent ticket' is double encoded as URL or something, after you edit a template twice. Maybe it doesn't recognize the field correctly, but that's a bit far-fetched.

            Maybe I can debug the PHP. Or at least I give it some time in the hope somebody else has a suggestion.
            Thanks again for your support.

            • RBGE replied to this.

              roberth Localisation really shouldn't have anything to do with this, but just to double check I installed the Dutch language pack to try again.

              Ticket thread:

              (I really have no idea what any of this says ? )

              Email received:

              So it's still doing the expected action with .lastmessage. I'm happy to give anything else a shot if you'd like me to check something, but I really have no idea what else could cause this.

              Write a Reply...