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

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

Scriptrunner Fast Track Script Assistance

Hello,

I am trying to write a fast track based off of two conditions. There are two seperate fast track post functions in the transition. Based off of the selections the ticket is meant to take a different transition out of the status.

First fast track
def var1 = cfValues['Department (Single Choice)']?.value
def var2 = cfValues['Amount (Estimated)'] as Long //cast to long for numerical comparisons

def result = var1.equals("5/5") && var2 <= 999999.99
Transition: send to approved

Second fast track
def var1 = cfValues['Department (Single Choice)']?.value
def var2 = cfValues['Amount (Estimated)'] as Long //cast to long for numerical comparisons

def result = var1.equals("5/5") && var2 >= 1000000
Transition: To 3rd level approver

 

It seems to always send the tickets to approved status no matter what value the amount (estimated) field contains
amount (estimated) is a number field
Department (single Choice) is a single select field.

Thank you for any help!

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Confluence Cloud

🎨 Add some visual life to your templates

Hi Atlassian Community, My name is Avni Barman, and I am a Product Manager on the Confluence Cloud team. Based on feedback from you, we are giving admins more power to create templates that a...

100 views 1 3
Read article

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