Tell us how you use Jira Service Desk and get a Starbucks gift card for this! Share your experience to help us design a new solution for efficient communication with customers!
Skip to end of metadata
Go to start of metadata

Try our new app Smart Attachments for Confluence. Store your project documents, artifacts, and media assets in the shareable space storage in Confluence. See the app in action.

Starting from version 1.13.0, Smart Attachments add-on supports workflow conditions.

Conditions

Conditions allow you to verify whether the user can execute a specific transition. If the condition is not met, the button for performing transition is hidden and the user cannot move to the next step.

Condition Types

The following conditions are available:

ConditionDescriptionConfiguration
File Uploader is UserChecks that there is at least one attachment uploaded by one of the selected users.Selection of one or multiple users.

File Uploader is in Group

Checks that there is at least one attachment uploaded by the user from the selected user group.Selection of a user group

File Uploader is in Project Role

Checks that there is at least one attachment uploaded by the user with the selected project role.Selection of a project role

Category is not Empty

Checks that the specified category or categories contains at least one attachment.

Please consider the specifics of the condition while checking one or multiple categories, as follows:

  • For the situations when you need to check presence of at least one attachment in each category, you should create a condition for each category.
  • For the situations when you need to check presence of at least one attachment in any of the categories, you should create one condition and enumerate multiple categories in it.

Manual entry of one or multiple category names for checking.

Optionally, you can define verification of attachment availability, as follows:

  • any file in the category
  • files matching the name pattern
  • files matching the enter regular expression
Verify Number of Attachments in CategoryChecks that the specified number of attachments is available in the category.

Manual entry of the category name and the number of attachments that should be available in it.

Optionally, you can define verification of attachment availability, as follows:

  • any file in the category
  • files matching the name pattern
  • files matching the enter regular expression

You can also enable the option to treat document revisions as distinct attachments.

All conditions allows you to set only one criterion per condition. If you want to check several criteria at once before a transition, you should create separate conditions - one per each criterion. Only the File Uploader is User condition allows you to select multiple users at once.

Adding Conditions

  1. Open the project workflow which you want to add a condition for.
  2. Switch the project workflow to the edit mode.
  3. Locate the appropriate transition (arrowed line) and click Conditions 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 conditions.
  4. Click Add condition.
  5. On the opened page, select the appropriate condition type.
  6. Click Add.
  7. Configure the workflow condition.
  8. Click Add.
  9. In the notification block, click Publish Draft.

Note that conditions are executed one by one and not all at once. You can also group conditions or create nested condition structures. Additionally, you can toggle the logic for how the conditions in a group are applied between All and Any.

Editing Conditions

  1. Open the workflow step containing conditions you want to modify.
  2. On the Conditions tab, locate the condition for editing.
  3. Click Edit  icon.
  4. Make the required modifications.
  5. Click Update.

Deleting Conditions

  1. Open the workflow step containing conditions you want to modify.
  2. On the Conditions tab, locate the condition for removal.
  3. Click Delete icon.

Using name patterns and regular expressions

Smart Attachments add-on allows you to use the name patterns and regular expressions for checking attachments stored in categories.

Name Patterns

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

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

If you want to check the specific file formats (for example, DOC and 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 checking specific attachments in categories.

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

  • No labels