You can create and configure a post function to update attachment labels. This post function will add or replace labels of attachments based on the attachment name or regular expression. 

  1. Open the workflow into which you want to add a post function.
  2. Select the transition where you want to add a post function.
  3. Select Post functions.
  4. On the list with post functions, click Add post function.
  5. Select the Update attachments labels post function.

  6. Click Add.
  7. Configure one or more actions for the post function.

  8. Click Add.
  9. Publish the workflow.

FAQ

  1. I have configured the post function, but labels are not added to attachments in some Jira issues.

This behavior can be caused by the lack of permissions for our app in a particular Jira issue. If you have issue security levels configured, our app will lack permission to add labels in this project. You can resolve this issue by adding the project role atlassian-addons-project-access to the security level:

    1. In the upper-right corner of the screen, select Administration  > Issues.
    2. In the sidebar, select Issue security schemes to open the Issue security schemes page, which lists all the issue security schemes currently available in your Jira installation.
    3. Select the scheme name, or the Security levels link in the Actions column, to open the Edit issue security levels page.
    4. Locate the appropriate security level and click its Add link (in the Actions column), which opens the Add user/Group/Project role to issue security level page.
    5. Select the atlassian-addons-project-access project role, then click the Add button.