Access Last Child Variable from single tree select


  • Used Zammad version: 5.3.0-1670492123.7c45d087.centos8
  • Used Zammad installation type: package
  • Operating system: CentOS Stream release 8
  • Browser + version: Firefox 102.6.0esr (64-Bit

Expected behavior:

  • Use only the Last Child of an self-created nested single tree-select object for notification via trigger like discribet in the admin documentation (Variables — Zammad documentation)

Actual behavior:

  • If i use ticket.object it works perfect but shows the entire tree select path.
    If i use ticket.object.value or i got a “no such method” error.

Steps to reproduce the behavior:

  • Create Object: singe tree select with two rows and one child per row
  • Create Trigger: Object changed, add notice "Ticket moved to #{ticket.object.value}
  • Open New Ticket as Customer an select Object from tree select
  • Open Ticket as Agent an change Object via tree select

Is it possible to use only the last child from a tree select choice?
What is the Variable to access the last child?

Sorry, this is my first question an i hope i used the template correct an my question is understandable.
Thanks :wink:

I’m afraid that’s not possible.
Zammad provides the actual value the field technically has.

This is the way Zammad actually stores the value - this gets more obvious when you have a look on what Zammad returns for multiple tree selections:

a::aa::aaa   (single)
b, c, b::bb   (multi)

The UI has filters and hooks that makes the selection and display much more user friendly - but backend wise there’s no such thing. If you believe that this is a missing feature, feel free to create a feature request here:

Thanks MrGeneration.

Maybe it will be a feature in future.