Fixes #2544 - Can't remove auto assignment timeout.

This commit is contained in:
Rolf Schmidt 2021-08-24 16:37:19 +02:00 committed by Thorsten Eckel
parent f862f7ac5d
commit 60a3758d38
2 changed files with 19 additions and 1 deletions

View file

@ -510,7 +510,7 @@ class App.ControllerForm extends App.Controller
value = false value = false
if item.type is 'integer' if item.type is 'integer'
if value is '' if value is ''
value = undefined value = null
else else
value = parseInt(value) value = parseInt(value)
if param[item.name] isnt undefined if param[item.name] isnt undefined

View file

@ -7,4 +7,22 @@ RSpec.describe 'Manage > Groups', type: :system do
context 'ajax pagination' do context 'ajax pagination' do
include_examples 'pagination', model: :group, klass: Group, path: 'manage/groups' include_examples 'pagination', model: :group, klass: Group, path: 'manage/groups'
end end
context "Issue 2544 - Can't remove auto assignment timeout" do
before do
visit '/#manage/groups'
end
it 'is possible to reset the assignment timeout of a group' do
find('td', text: 'Users').click
fill_in 'Assignment Timeout', with: '30'
find('button', text: 'Submit').click
expect(Group.find_by(name: 'Users').assignment_timeout).to eq(30)
find('td', text: 'Users').click
fill_in 'Assignment Timeout', with: ''
find('button', text: 'Submit').click
expect(Group.find_by(name: 'Users').assignment_timeout).to be nil
end
end
end end