$customHeader
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 3 Next »

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 (JMWE app) post-function.

Instructions

  1. Navigate to the desired workflow transition and add the “Email issue (JMWE app)” post-function.

  2. Add Email Content (Subject, Body)

  3. Under “Recipients”, add the below script in “Users from script:”

    def users = []
    def groupManager = ComponentAccessor.getGroupManager()
    def groups = issue.get("customfield_12300")
    for (group in groups) {
      for(user in groupManager.getUsersInGroup(group))
    	users.add(user)
    }
    return users?.unique()

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

References

  • No labels