I am looking to have a post-function that emails out the most recently attached PDF to the issue being transitioned. I have looked at the "Send custom email" post-function, but I can't think of how to send ONLY the most recent attachment that is a PDF.
I don't want to send all of the PDF attachments, only the latest one attached to the issue.
I am working with the assumptions that the attachments won't be added on this transition and that more than one of the specified type will be on the issue.
Does anyone have any insights into a custom attachment callback for this?