Fast Track issue on Cascade select Field value

Hi,

I'm trying to fast-track an issue on a cascade select list value (1st option).
I followed the example and my condition is:

cfValues['On-Hold Reason']?.get(null) == 'Carrier'

The Post-Function is placed after the Fire Event (last step).
Using JIRA 6.3.10 and Script Plugin 3.0.10

Below is the debug 

2015-03-09 11:05:55,219 http-bio-9280-exec-23 DEBUG t812916 665x52761x1 1970b6w 10.137.133.64 /secure/CommentAssignIssue.jspa [canned.jira.utils.ConditionUtils] Condition: cfValues['On-Hold Reason']?.get(null) == 'Carrier' returned: false
2015-03-09 11:05:55,219 http-bio-9280-exec-23 DEBUG t812916 665x52761x1 1970b6w 10.137.133.64 /secure/CommentAssignIssue.jspa [jira.workflow.postfunctions.FasttrackTransition] Condition wasn't true

But the field is set as "Carrier" and if I place the following into the condition 

log.debug( cfValues['On-Hold Reason']?.get(null) )

I get the below debug

2015-03-09 11:14:07,835 http-bio-9280-exec-14 DEBUG t812916 674x52965x1 1970b6w 10.137.133.64 /secure/CommentAssignIssue.jspa [onresolve.scriptrunner.runner.WithPluginCompilationCustomiser] Compilation of Script45.groovy, to node: Script45
2015-03-09 11:14:07,853 http-bio-9280-exec-14 DEBUG t812916 674x52965x1 1970b6w 10.137.133.64 /secure/CommentAssignIssue.jspa [canned.jira.utils.ConditionUtils] Carrier
2015-03-09 11:14:07,853 http-bio-9280-exec-14 DEBUG t812916 674x52965x1 1970b6w 10.137.133.64 /secure/CommentAssignIssue.jspa [canned.jira.utils.ConditionUtils] Condition: log.debug( cfValues['On-Hold Reason']?.get(null) )
2015-03-09 11:14:07,853 http-bio-9280-exec-14 DEBUG t812916 674x52965x1 1970b6w 10.137.133.64 /secure/CommentAssignIssue.jspa [canned.jira.utils.ConditionUtils] Condition did not return a boolean, coercing to false

Any idea why the (original) condition fails?

Thanks,

Sven

1 answer

This widget could not be displayed.

The Object returned by

cfValues['On-Hold Reason']?.get(null)

seems to be of Type

com.atlassian.jira.issue.customfields.option.LazyLoadedOption

So what works is

cfValues['On-Hold Reason']?.get(null).getValue().equals('Carrier')

Might be worth to correct the example coming with it....

 

 

Ok, so I know this is over a year later and I didn't even ask this question, but thanks Sven. Your answer works and just saved me a ton of time.

Thanks

Dave

 

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Wednesday in New to Jira

Are you planning to trial, or are currently trialling Jira Software? - We want to talk to you!

Hello! I'm Rayen, a product manager at Atlassian. My team and I are working hard to improve the trial experience for Jira Software Cloud. We are interested in   talking to 20 people planning t...

292 views 5 0
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you