...
Starting with Power Scripts for JIRA (formerly known as JJUPIN) 4Jira 4.0, we've added the ability to use SIL Scripts scripts to process incomig emails. Power Scripts for JIRA provides a set of specific routines for use withing mail handling scripts that allow you to read the contents of the incoming email and handle any attachments, as described below.incoming emails.
Specific SIL integrations
Power Scripts for JIRA Jira provides a set of specific routines for use withing mail handling scripts that allow enable you to read the contents of the incoming email and handle any attachments, as described below.
...
Predefined structure: IncomingEmail
Name | Field | Type | Obs |
---|---|---|---|
from | string [] | array of email addresses | |
to | string [] | array of email addresses | |
cc | string [] | array of email addresses | |
subject | string | ||
body | string | this is the entire body of the message, including any quoted text in case of replied/forwarded messages | |
attachments | string [] | array containing the names of the attachments; there can be duplicates |
...
- If the first email address in the "from" field (the sender of the email) belongs to a registered JIRA Jira user, the script will be run as that user (currentUser() will return that user). Otherwise, the script will be run as an anonymous user.
- The return value of the script dictates if other mail handlers will be called for the email or not.
- If the script returns true or has no return value, the email is considered as "handled" and subsequent mail handlers will not be called.
- If the script returns false or throws an error, the email is considered "not handled" and subsequent mail handlers will be called.
Here is an example of mail handler equivalent to JIRAJira's built in "Create issue or add comment".
...
To delete the mail handler, use the JIRA Jira standard feature.
That's it!