Trying to set up a behaviour for a select list where the option in the list is a number

TS037651
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 27, 2024

Trying to set up a behaviour for a select list where the option in the list is numeric, not working as expected, when the option is not numeric it's working. Would someone be able to tell me what I'm doing wrong?

def selectVal = dropDown.getValue()


if (selectVal.toString().contains("1")) {
This one is working as expected

 

if (selectVal.toString().contains("Not a Tool")) {

1 answer

0 votes
Brant Schroeder
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 8, 2025

@TS037651 welcome to the Atlassian community

Just change it to One, Two, Three, etc.  Then it will work.  Maybe there is a limitation with the contains needing to be more than one character long to work.

 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events