anteo / redmine_custom_workflows

Allows to create custom workflows for Redmine
http://www.redmine.org/plugins/custom-workflows
GNU General Public License v2.0
178 stars 72 forks source link

Checking Multiple selectable List type Custom Field #250

Closed atopcu closed 2 years ago

atopcu commented 2 years ago

Hi, I've a multi selectable list type custom field. How can I check specific one is selected or not in list?

Regards!

AirTibu commented 2 years ago

Hi,

Use this code:

custom_field_value(180).to_a == [""]

if "true", then no selected item in multi selectable list. (Stands for: empty)

I hope it helps!

AirTibu commented 2 years ago

Hi,

If you need to check specific text, you can use this code:

["My specific text"].include?(custom_field_value(180).to_a)

I hope it helps!

atopcu commented 2 years ago

It is working. Thanks AirTibu!