Download PDF
Download page Manage workflow post functions.
Manage workflow post functions
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-function | Description | Configuration |
---|---|---|
Delete attachments from categories | Allows you to delete one or multiple attachments from one or multiple categories. You can define the following options:
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:
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:
|
Add Post Functions
- Open the project workflow to which you want to add a post-function.
- Switch the project workflow to the edit mode.
- 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.
- Click Add post function.
- On the opened page, select the appropriate post function type.
- Click Add.
- Configure the post function parameters.
- Click Add.
- In the notification block, click Publish.
Edit post functions
- Open the workflow step containing post functions you want to modify.
- On the Post Functions tab, locate the post function for editing.
- Click Edit icon.
- Make the required modifications.
- Click Update.
Delete post functions
- Open the workflow step containing post functions you want to modify.
- On the Post Functions tab, locate the post function for removal.
- 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.