Recent searches
No recent searches
Bug - When using org fields to create a ticket subject, the placeholders show up
The Product Manager Whisperer - 2022Community Moderator
Posted Nov 02, 2021
So I use macros and/or triggers to set the subject of some tickets. Many times I'll use custom org fields in the naming convention using placeholders. When I do, the placeholder shows up until I "resubmit" the ticket, then it's fine. It shows up in the ticket subject and in views as well. For instance, here's the subject line (redacted) how it looks after running the macro:
Here's how it looks when I place my cursor in the subject field:
Once I submit it, it displays properly.
In this particular case, I ran the macro using bulk edit. Not sure if that is relevant or not.
0
10
10 comments
Lou
Here's a view(redacted) of the event after the "resubmit":
0
Jean-Charles Pascale
If I understand correctly, the correct data is populated on the second submission of the subject of the ticket.
If so, this is an expected behavior. Indeed, at ticket creation time, the organization of the ticket is not defined, and therefore the placeholder for ticket.organization.XXXXX has no real value. The placeholder is therefore not replaced.
When you update the ticket a second time, the ticket has a set organization, and therefore the placeholder has a set value and is replaced when the ticket is submitted again.
I hope this clarifies the behavior of the placeholders.
Kind Regards,
0
Lou
The ticket has a set organization when it is created. These particular tickets were created using an API which assigned an org and requester at creation. The macro is run after they have been created.
Also, it only corrects itself if I leave the cursor in the subject field when submitting. If the cursor is anywhere else, the placeholders remain after resubmitting.
I can recreate the bug any time I want. I would be happy to demonstrate.
0
Lou
Also, it's not just org fields. It appears to be happening with any placeholder. I have the same thing going on with ticket field placeholders.
0
Jean-Charles Pascale
When doing a similar test via APi, indeed, the placeholders are not replaced. Like I mentioned, even though in the API call you set the fields to a specific value, when the ticket creation in processed, those values do not exist yet in the ticket, and the placeholder therefore has no value.
However, when you submit the ticket again, the value is now there and the value is therefore replaced in the subject.
0
Lou
Again, it is a macro that sets the subject, well after the ticket is created. When the macro is run, those values DO exist.
0
Jean-Charles Pascale
Hi Louis,
If you simply set a macro to set the title, then it should work immediately in the ticket indeed.
I attempted with a macro that sets the subject to {{ticket.title}} [{{ticket.organization.custom_fields.champ_org_dropdown}}] and it works as expected.
Could you confirm that the issue happens in any browser and in incognito mode?
Could you confirm that the issue also happens without the apps on your account? You can temporarily disable them for your session using ?noapps, as described in our documentation
-JC
0
Lou
I'll have to wait for another example to pop up. In the meantime, it does appear this only happens when running the macro while bulk editing tickets, although I may be mistaken on that.
0
Lou
I verified the issue exists in Chrome, Firefox and MS Edge. It also existed in Chrome incognito. I have also confirmed the issue in Chrome with ?noapps invoked.
0
Lou
I have also confirmed that this only happens when I run the macro while bulk updating tickets. If I run the macro on a single ticket, no problem.
0