Forums

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

Script listener condition for the status is in a list or not in the list of statuses

Alexey Paveliev
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 3, 2020

Hello!,

 

something like this works like a charm

issue.status.name == "Approved"

But I struggle with a condition checking against few possible values

["Satus A","Status B"].contains(issue.status.name) did not work

neither did an attempt to use a regexp example from docs:

issue.status.name.match('^(Approved/Launch Pending|Canceled|Waiting on Response|Requestor Review|In Progress)$') != null

Honestly I am not a regexp pro :)

 

 

1 answer

0 votes
Hana Kučerová
Community Champion
December 3, 2020

Hi @Alexey Paveliev ,

I believe "contains" should work, it's strange, it doesn't work. Did you try to debug the value of issue.status.name, if the value is really the same as one of the valuese in the list?

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events