Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,644,484
Community Members
 
Community Events
196
Community Groups

scriptrunner getWorkflowButtons.call() permission and token problem

Edited

I made a scripted workflow postfunction to send email to reviewer. inside the email, I used getWorkflowButtons.call() to display workflow buttons for reviewer to approve/reject. it works well if no special permission setup.

then in my workflow, I want to allow approve/reject only for reviewers, but not for submitters, so I add permission control in workflow condition.

the first problem is. the workflow is triggered by submitter. so the function getWorkflowButtons.call() get all the buttons as submitter's permission, but for the reviewer, so the approve/reject button doesn't show.

How can I provide workflow buttons in email that works for reviewers?

when calling getWorkflowButtons.call() can I set any project role to limit the buttons?

the second problem is, the button by default point to an URL with token inside, but when reviewer receives email and click the button, it always show token missing error "XSRF Security Token Missing". How can I get this error resolved? (although retry works, but the user experience is bad.)

Thanks!

 

1 answer

For the first problem, just change the order of this postfunction

Thanks for the answer. 

May I know to which step/order should my script run?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events