Closed michamos closed 8 months ago
Tech notes:
reply_ticket_with_template
and reply_ticket
functions into one with optional template
and template_context
parameterresolve_ticket
function to take template
and template_context
parameterreply_ticket
with close_ticket
(and adding a template) incase the ticket will get closed in the next step anyways
When a user submission gets accepted, we send them an email with the link to the record and close the ticket. This is currently done in two different steps (first adding the message to the ticket then closing with the message
The ticket has been closed
). The problem is that seems racy on SNow: the user gets the email with the messageThe ticket has been closed
twice as the first email often gets sent after the ticket has already been closed. Example (check activity tab to see the whole history of events): https://cern.service-now.com/nav_to.do?uri=%2Fu_request_fulfillment.do%3Fsys_id%3Dccc2699f479a31508c97ed4c736d43f6.It might be a bug in SNow (though they're saying we're holding it wrong in the ticket I opened) but it would be better if the ticket closing API call would take a closing message as payload to avoid them being two separate SNow events.
We should probably review the whole API to make sure we're doing things properly.