Starting from version 1.13.0, Smart Attachments for Jira supports workflow post functions. Post functions allow you to perform additional operations on the issue once the transition has been executed.

Available Post Function Types

Please note that all the post-functions are executed on the behalf of the JIRA administrator. Specific access restrictions are not exercised when performing a post-function.

Please consider this when configuring the workflow and individual post-functions.

If you need different behavior, please share your thoughts with us.

Post-functionDescriptionConfiguration
Delete attachments from categories

Allows you to delete one or multiple attachments from one or multiple categories.

You can define the following options:

  • enter one or multiple categories which attachments will be removed from
  • enable removal of all attachments from the specified categories
  • enable removal of specific attachments depending on the name pattern or regular expression

Note that the app doesn't consider flags of regular expressions.

Move attachments to category


Allows you to move attachments from the source category to the target category.

You can define the following options:

  • enter the source and target categories for moving attachments
  • enable the moving of all attachments from the specified categories
  • enable the moving of specific attachments depending on the name pattern or regular expression
  • enable the moving of the latest document revision only, while all the other revisions will be preserved in the source category

Note that the app doesn't consider flags of regular expressions.

Email attachments from categories


Allows you to send an email with attachments from one or multiple categories.

You can define the following options:

  • define the post-function name (for example, Email to Management, Email to Employee and so on)
  • enter email addresses of recipients including CC and BCC or select custom fields of the User Picker or User Group Picker type
  • specify the email subject
  • specify the email body
  • enter categories with attachments that should be sent to the specified emails
  • enable the sending of all attachments from the specified categories
  • enable the sending of specific attachments depending on the name pattern or regular expression
  • enable the email sending without attachments (in case of no attachments matching the pattern)
  • enable the posting of the email copy to the issue comments once the post-function has run

Add Post Functions

  1. Open the project workflow to which you want to add a post-function.
  2. Switch the project workflow to the edit mode.
  3. Locate the appropriate transition (arrowed line) and click Post Functions in the properties panel. Alternatively, you can select the target workflow step (when working with the text version of the workflow). You are redirected to the page listing the post functions.
  4. Click Add post function.
  5. On the opened page, select the appropriate post function type.
  6. Click Add.
  7. Configure the post function parameters.
  8. Click Add.
  9. In the notification block, click Publish.

Edit post functions

  1. Open the workflow step containing post functions you want to modify.
  2. On the Post Functions tab, locate the post function for editing.
  3. Click Edit  icon.
  4. Make the required modifications.
  5. Click Update.

Delete post functions

  1. Open the workflow step containing post functions you want to modify.
  2. On the Post Functions tab, locate the post function for removal.
  3. Click Delete icon.

Use name patterns and regular expressions

Smart Attachments for Jira allows you to use the name patterns and regular expressions for matching attachments stored in categories.

Name Patterns

Name patterns allow you to quickly enumerate the full or partial file names or file formats of attachments that should be processed by the post-function. You can enter one or multiple words or file formats for processing by the post function. In case of multiple items, you need to separate them with the comma.

For example, you want to process only attachments containing the word 'contract'. Enter the word 'contract' into the corresponding text field.

If you want to process the specific file formats (for example, DOC or PDF files), you should enter 'doc, pdf' into the corresponding text field.

Regular Expressions

Regular expressions allow you to quickly enter the flexible query for matching specific attachments in categories.

For example, you want to proceed only attachments with *.docx or *.pdf formats. You need to enter the following regular expression '(.+?)(.docx|.pdf)$'.

Note that the app doesn't consider flags of regular expressions

It means that if you can't use any of the following flags when creating a regular expression for the app:

  • g : matches the pattern multiple times
  • i : makes the regex case insensitive
  • m : enables multi-line mode
  • u : enables support for unicode
  • s : causes the . to also match new line characters

However, you can rewrite RegExp without flags to satisfy your needs.