The problem is simple: there are no logical branches in text modules. To be able to realize at least simple conditional text outputs, the output of empty text modules when they in fact are empty would be helpful.
Example: we create a simple text object “Salutation”. Depending on the origin of the ticket, the values are then set via API to, e.g., Mr., Ms., Mrs. Dr., etc. For tickets for which we have no information on the salutation, the field remains empty.
We can then specify the following in a text module:
Good day #{ticket.user.salutation} #{ticket.user.firstname} #{ticket.user.lastname}
If an empty text module would be outputted as it is (empty), the result would then be, for example:
Good day Max Mustermann
not nice because of the extra space, but ok.
Currently, however, the output is:
Good day - Max Mustermann
→ that’s unusable… The more complex the use case, the more unusable
Maybe it would be an option to make the placeholder character configurable e.g. via a system variable? As default then gladly “-” but with the possibility to output an empty string instead?
Another use case for using really empty placeholders to further personalise communication:
We have a text object “greetings_to” and synchronise it via API with a localised string that refers to the customer’s place of residence if known, e.g. “to Mbarara”.
With this we could add in the signature:
Greetings #{ticket.user.greetings_to}
Result would be:
Greetings to Mbarara
If greetings_to is not set that should be the result:
Greetings
Since Zammad outputs a minus sign instead of empty placeholders, but the result is: