Our new Appfire Documentation Space is now live!

Take a look here! If you have any questions please email support@appfire.com

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 7 Current »

This article provides the code snippet to send emails to users in the group(s) selected in a multi-group picker field in Email issue(s) (JMWE app).

Instructions

  1. Navigate to the intended workflow to make the necessary changes in the edit mode.

  2. Select the required transition.

  3. Select the Post functions tab and click Add post function.

  4. Add the Email issue(s) (JMWE app) post-function.

  5. Add:
    Email content: Enter Subject, Text Body as needed.
    Recipients: Enter the following in Users from template:

    {% set allUsers = [] %}
    {% for grp in (issue.fields.customfield_10082 | field("name"))%}
    {% for user in (grp | groupMembers) %}
    {% if (allUsers | filter(user | field("accountId")) | length == 0) %}
    {% set ignored = allUsers.push(user | field("accountId")) %} 
    {% endif %}
    {% endfor %}
    {% endfor %}
    {{ allUsers }}

Replace 10082 with the id of the multi-group picker custom field.

Publish the workflow for the changes to be applied as configured.

References


\uD83D\uDCCB Related articles

  • No labels