It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Comala Workflow - Email Trigger

Peter Chang Feb 02, 2018

Hi, 

I'm trying to modify the "Simple approval workflow" by adding an approval process and triggering an email to be sent to the selected "Reviewers". My intention is to assign the review task to a member of the reviewer group and have an email notification sent to that person so they know there's a document pending their review/approval.

My approval process seems to work. When I click on assign, a list of members from the "Reviewers" group will show in the drop down. What I can't get working is the email notification. I suspect I have the trigger set incorrectly? I'm also not sure if "user=@Reviewers@" will work. I want the notification to be sent to the selected reviewer.

 

{workflow:name=Simple approval workflow|key=com.comalatech.sample.approvals.01}
{description}
The Simple Approval Workflow has 2 states.
In Progress: Staff edit pages, not visible to non-team members. Approved: Staff approve, visible to public.
{description}
{state:In Progress|approved=Approved|taskable=true}
{approval:Review|assignable=true|group=@Reviewers@}
{state}
{state:Approved|final=true|updated=In Progress|hideselection=true}
{state}
{trigger:statechanged|state=Review}
{send-email:user=@Reviewers@|subject=Page ready for approval}
The page @page@ is waiting for your approval.
{pageactivity}
{send-email}
{trigger}
{workflow}

 

 

Thanks,

Peter

1 answer

1 vote
Patricia Yague Apr 09, 2018

Hi Peter!

Having a look at your requirements, I think the solution you need is the following:

{workflow:name=Simple approval workflow|key=com.comalatech.sample.approvals.01}
{description}
The Simple Approval Workflow has 2 states.
In Progress: Staff edit pages, not visible to non-team members. Approved: Staff approve, visible to public.
{description}
{state:In Progress|approved=Approved|taskable=true}
{approval:Review|assignable=true|group=reviewers}
{state}
{state:Approved|final=true|updated=In Progress|hideselection=true}
{state}
{trigger:pageapprovalassigned|approval=Review}
{send-email:user=@assignee@|subject=Page ready for approval}
The page @page@ is waiting for your approval.
{pageactivity}
{send-email}
{trigger}
{workflow}

 

the pageapprovalassigned is fired when the reviewers are assigned in the first state, and the @assignee@@ value reference will send the email to the assigned user.

Also, you don't need reference when using group names, please have a look at the example here -> https://wiki.comalatech.com/display/CW/send-email+macro

Please have a look at the documentation for more information and let me know if you need any help:

https://wiki.comalatech.com/display/CW/Value+Reference

https://wiki.comalatech.com/display/CW50/trigger#trigger-Events

 

Thanks!

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Posted in Marketplace Apps & Integrations

Demo Den Ep. 4: Continuous Integration with CircleCI & Jira Software

Get ready! Demo Den Episode 4 is coming your way on Tuesday, May 28, 2018 with a Continuous Integration and Delivery special demo. CircleCI Director of Solutions Engineering, Eddie Webb will show us ...

687 views 0 4
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you