I’m trying to write a plugin that emails the latest note. Looking at the values available in $request, it has all the notes in the ticket except the latest that was just entered. Is the trigger being called before the update instead of just after the update? How do I get the information?
Can you explain which API you’re using to get this info and how things are setup in more detail?
I created a request push class that, for now, simply emails me the entire contents of the $request parameter. I created a trigger that calls the request push class whenever a ticket tied to a particular email address is updated. To test it, I log on to the mobile helpspot interface and update a ticket. The request push is executed as expected and I get the email. However, it seems that $request doesn’t contain the note that was just entered during the update. $request[‘request_history’] gives me the list of previous updates to the ticket, but also doesn’t include the current update.
Does my setup make sense to you? Do you need more information?
Sorry for the delay, that does make sense. That is correct on the trigger currently. There’s a bit of a chicken or the egg aspect to adding it into the history. It may eventually be possible to pass in just the note in addition to the old history but not at this moment. I’ve put it down for a closer look, but I don’t have a good short term solution.