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,364,787
Community Members
 
Community Events
168
Community Groups

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

Atlassian Community Events