Working with Approvals from groovy script

Hi all, 

We are on JSD v.3.2.6 now and would like to move our current standart approval process to the new one. We have our own approving process with approving by email (from project automation)

As I understood after a few tests, when enable new Approvals, jira's project automation module became useless for transitioning issue on this status. 

Now I need to write a script to do something like automation does: 

if last comment contains @approve then transition issue as approved, 

if last comment contains @decline then transition as declined. 

Maybe anybody did the similar thing?  

Or how I can be done using service desk api?


1 answer

I think you just want a script listener listening for Issue Commented, then:

if (event.getComment().body.contains("@approved")) {

Lots of examples here about how to do the transition...

Hi Jamie, 

Thank you for your answer! 

Actually my question is about how to transition Approvals as if the user enters the portal and clicks on the button Approve or Decline. 

For example, I've tried to do this with scriptrunner's Escalation service (for a test I've just transitioned issue (Approve) without any conditions). While running it, if select skipping Conditions/Validators/Permissions it transitions the issue, but Approve / Decline buttons stay on the display for approvers, and this person is pending with 1 approval needed

Is this Approval stuff a new feature of JSD? If so got a link to the docs?

Or is it just standard workflow stuff?

yes, I try to work with new JSD 3.2 approvals. I cannot find their api, (tried to find here sorry for such a stupid question ) and there are no any examples how to work with it :| 


OK I found - but I'm not sure if this is done with workflows or something new. Sorry, I am out of date on JSD.

Yes I have read it, but there is no information about how to work with them from the script side.

Anyway thank you smile

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Wednesday in Marketplace Apps

Marketplace Spotlight: Marketing apps for Confluence to keep your teams working on the same page


117 views 0 3
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you