Trigger - create note in Object

I need help to set status with the right syntax and placeholder, if the trigger is set.

  • Used Zammad version: 6.2.0-1707987827.798dd740.jammy
  • Used Zammad installation type: package
  • Operating system: Ubuntu 22.04.3 TLS
  • Browser + version: Edge 121.0.2277.128

Expected behavior:

I have a trigger that creates a note whenever the status changes. Now I want to see the first name, last name, and date with time in the note as well.
I tried it with ‘The ticket was approved by #{user.firstname} #{user.lastname}.’

Actual behavior:

I expected to receive the name of the person who changed the status.
Like this → The ticket was approved by Max Mustermann.
But i get this → 'The ticket was approved by #{user / no such object} #{user / no such object}.

picture of the trigger

However, we actually want it for changes from the status ‘waiting for customer’, ‘waiting for delivery’, ‘waiting for approval’, ‘on Hold’, and so on. For me, it’s an important aspect in Zammad because I also want to track who made changes to the ticket.

Hope this is possible in Zammad

Hi @Metzi. Please try to use current_user instead of user.

The ticket history might be helpful in general as well for checking who did some changes on a ticket.

Hi @fliebe92
Is it like this? #{ current_user.firstname} #{ current_user.lastname}
or only #{ current_user}

Edit:
i tried these, but nothing works for me.

#{current_user}
#{current_user.firstname}
#{current_user.lastname}
{current_user.firstname}
{current_user.lastname}
{current_user}

Hi @Metzi. Not sure if this will help in all situations, please experiment with #{ticket.updated_by.fullname}.

Too bad, unfortunately that didn’t work either.

At least it’s working in my test instance, hm. Then I’m sorry, no idea.

Hey @fliebe92,
i tested the syntax again and if i set the trigger with your syntax, it works.
But it only works if it beginns with it.

this works
#{ticket.updated_by.fullname} hat den Status geändert.

this does not work, cause the # is located as text.
Der Status wurde durch #{ticket.updated_by.fullname}

So it works :slight_smile:

In my case i got a new group, role, status and object to add an approval workflow.

But in this workflow this does not work.

It looks like there is no Name to add inside the notice

Is there a documentation what Syntax works or something like this?

To anybody who needs more
Ticket — Zammad Admin Documentation Dokumentation

It does not matter at which index the variable is used, in the screenshot above the ticket was changed by the user with ID 1 that simply has no first/last name and therefore no full name. This could happen.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.