The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Scriptrunner Fast Track Script Assistance

Michael Salvio
December 18, 2018

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

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

TAGS
AUG Leaders

Atlassian Community Events