Fast-track transition based on value

Lakshmi S May 10, 2023

Hi Team,

We have a requirement that the transition from "Waiting for VP" to Tech Review", If the cost at Approval is less than 50k, the transition will go directly to "Ready for Accounting", if its more than 50K, it will transition to "Waiting for CTO". It's working as expected, but if we give the value of 100k or more than 100K, it's not working. It's working for the value of $99,000.
Does anyone have any idea why it's not working on $100,000 or more than that value?

I am using Fast-track transition an issue [ScriptRunner]

 

Pworkflow.PNGWtran.PNG

1 answer

1 accepted

2 votes
Answer accepted
Ram Kumar Aravindakshan _Adaptavist_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 10, 2023

Hi @Lakshmi S

Looking at your screenshot, the approach doesn't seem to be correct.

When you are using < (lesser than) and > (greater than) operators, it will only work for numeric values.

However, in your screenshot, you are using it against a String value, i.e. '$50,000'. This will not work.

Instead, it would be best if you tried something like this:-

def amountValue = cFieldValues['Cost at Approval'] as Long

amountValue >= 50000

for greater than 50,000

and something like this 

def amountValue = cFieldValues['Cost at Approval'] as Long

amountValue < 50000

for lesser than 50,000 and see if there is a difference.

In my environment, I tested for greater than and equal to 100,000, which should automatically transition to In Progress upon creation, and it works as expected.

Below is a screenshot of my Fast-Track Transition:-

image3.png

I hope this helps to answer your question.

Thank you and Kind regards,

Ram

Lakshmi S May 11, 2023

Thank you @Ram Kumar Aravindakshan _Adaptavist_ for the correction. It's working now.

def amountValue = cfValues['Cost at Approval'] as Long amountValue < 50000

But it's good if we provide a value like "$49,000", it makes scenes to users how much amount it is exactly.

Suggest an answer

Log in or Sign up to answer