The Script Listener "Send custom email" allows users to set a custom callback to filter the attachments.
If the listener is mapped on a Service Desk project, the following custom callback
will not return any attachment because the isNew() method always return a false value even when there is an attachment on the new comment made.
Steps to replicate:
- Create a "Send a custom email" listener mapped to a Service Desk project
- Map it to an event like "Issue Commented"
- Select "HTML" as mail format
- On the "Include Attachments" field select "Custom"
- Place this script inside the "Custom attachment callback" field:
- Now create an issue from the Service Desk portal
- Add a comment with an attachment
- The mail does not contain the full attachment file but only the standard Service Desk link to the attachment