Fixes #3334 - Trigger-conditions 'Email' required the @ sign.

This commit is contained in:
Rolf Schmidt 2020-12-14 11:24:53 +01:00
parent 72c1cab71b
commit a5438ff149
2 changed files with 15 additions and 0 deletions

View file

@ -92,6 +92,8 @@ class App.UiElement.ticket_selector
# ignore passwords and relations
if row.type isnt 'password' && row.name.substr(row.name.length-4,4) isnt '_ids' && row.searchable isnt false
config = _.clone(row)
if config.type is 'email'
config.type = 'text'
for operatorRegEx, operator of operators_type
myRegExp = new RegExp(operatorRegEx, 'i')
if config.tag && config.tag.match(myRegExp)

View file

@ -33,6 +33,19 @@ RSpec.describe 'Manage > Trigger', type: :system do
end
end
end
it 'sets a customer email address with no @ character' do
visit '/#manage/trigger'
click '.page-header-meta .btn--success'
modal_ready
find(".js-attributeSelector select option[value='customer.email']").select_option
fill_in 'condition::customer.email::value', with: 'zammad.com'
fill_in 'Name', with: 'trigger 1'
click '.js-submit'
modal_disappear
end
end
context 'Perform' do