How to add a condition for a custom option list field in Jira and test if the field has the default None value?

Sorin Sbarnea (Citrix)
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.
June 11, 2012

I want to add a condition in an workflow to not allow to go further if a custom field of type option list has the default value, value that is None (not the None string).

I tried to add condition != None (as String) and it failed.

It is funny but I wasn't able to locate documentation regarding the values.

1 answer

0 votes
Mizan
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.
June 11, 2012

we cannot use != to compare strings.

Sorin Sbarnea (Citrix)
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.
June 11, 2012

Thanks, but I was looking for a solution, not a confirmation that this doesn't work :)

Mizan
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.
June 11, 2012

Your question gives very less idea about your problem , can you elaborate ?

are you creating a plugin ?

can you post little more code ?

do you get any compilation errors or runtime exceptions ?

AFAIK there are plenty of documents available on creating a workflow condition ( plugin or script)

you should even refer this answer by Nic Brough

Sorin Sbarnea (Citrix)
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.
June 11, 2012

It's only about jira 3.x configuration, it's not about plugins. I added a screenshot with the Add condition fields. The problem is that I don't know how to configure the condition to check if the field is not set to default value, which is None (not None string).

Mizan
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.
June 12, 2012

I have never used 3.x its a very old version of Jira . Try using -1 instead of None in the value field . This is just a wild guess hope it helps .

Suggest an answer

Log in or Sign up to answer