Skip to content

Commit

Permalink
Fixes #3712 - Core worflow perform action "select" should not make mu…
Browse files Browse the repository at this point in the history
…ltiple values selectable.
  • Loading branch information
rolfschmidt authored and thorsteneckel committed Aug 27, 2021
1 parent e359dd7 commit 96c126a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
Expand Up @@ -485,8 +485,7 @@ class App.UiElement.ApplicationSelector
if attribute.value && attribute.value[groupAndAttribute]
config['value'] = @buildValueConfigValue(elementFull, elementRow, groupAndAttribute, elements, meta, attribute)
if 'multiple' of config
config.multiple = true
config.nulloption = false
config = @buildValueConfigMultiple(config, meta)
if config.relation is 'User'
config.multiple = false
config.nulloption = false
Expand Down Expand Up @@ -516,6 +515,11 @@ class App.UiElement.ApplicationSelector
else
elementRow.find('.js-value').removeClass('hide')

@buildValueConfigMultiple: (config, meta) ->
config.multiple = true
config.nulloption = false
return config

@humanText: (condition) ->
none = App.i18n.translateContent('No filter.')
return [none] if _.isEmpty(condition)
Expand Down
Expand Up @@ -125,6 +125,14 @@ class App.UiElement.core_workflow_perform extends App.UiElement.ApplicationSelec

super(elementFull, elementRow, groupAndAttribute, elements, meta, attribute)

@buildValueConfigMultiple: (config, meta) ->
if _.contains(['add_option', 'remove_option', 'set_fixed_to'], meta.operator)
config.multiple = true
else
config.multiple = false
config.nulloption = false
return config

@HasPreCondition: ->
return false

Expand Down

0 comments on commit 96c126a

Please sign in to comment.