Closed ashrafalzyoud closed 1 year ago
Hi,
In case of multiple value field use this code:
CustomFieldEnumeration.where(id:custom_field_value(1).to_a,custom_field_id:'1').pluck(:name).each do |cfenum|
@issue.tag_list << cfenum.to_s
end
I hope it helps!
Custom workflow error (Please contact an administrator)
@AirTibu
Hi,
It's working fine for me. Use in before save section.
This code causing Custom workflow error (Please contact an administrator) if you try to use on NON multiple value field.
1-its work only if im choose multiple value, but maybe user choose one value or three value 2- cfs1 look like this somthing wronge
Did you change the custom field id (1) to your custom field id?
IN MY CASE cfs id 8
can u update the code the user can choose one value or multiple value
If the custom field type is Multiple values, then the code works if empty, if choosed only 1 option or choosed more option. I tested all the scenarios and it is working properly.
You can try with this code:
CustomFieldEnumeration.where(id:custom_field_value(8).to_a,custom_field_id:'8').pluck(:name).each do |cfenum|
self.tag_list.add(cfenum.to_s)
end
its working thx for u alooooooooooooooooooot
272
Not working if cfs[1] multiple value