Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Attempting to trigger an email only when the state changes

Adam M. Parmenter
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 11, 2019

Users where getting too many emails.  Especially an email when assigned to a workflow.  I only want an email sent when the workflow reaches a state to which they are assigned.

Below is a test workflow that triggers an email only when the state changes to "Approval Routing".  The workflow functions.

My network ID is User1 (not really, but my actual network ID has worked)

When the state changes to Approval Routing, no email.

At the Space Tools Notifications, Approval -Assginee is Desabled as I only want an email to go out at state change.

 

My workflow:

{workflow:name=Test_DefaultApprover}
{description}
Description here
{description}
{state:Draft|submit=Approval Routing|assignable=true}
{state}
{state:Approval Routing|approved=Approved|rejected=Draft|colour=#ff8b00}
{approval:Specific Approver|user=User1}
{state}
{state:Approved|final=true|updated=Draft}
{state}
{trigger:statechanged|state=Approval Routing}
{send-email:user=@approvalassignees@|subject=@pagetitle@ submited for your approval|mimetype+text/html}
The @type@ @pagelatest@ has been submitted for approval by @approver@.

For details, see: @pageactivity@@
{send-email}
{trigger}
{workflow}

0 answers

Suggest an answer

Log in or Sign up to answer