Fixes #3835 - Invalid group and owner list for tickets created via customer profile.
This commit is contained in:
parent
1bd1cd669f
commit
ff6af07b9a
2 changed files with 18 additions and 1 deletions
|
@ -330,8 +330,12 @@ class App.FormHandlerCoreWorkflow
|
||||||
|
|
||||||
# get params and add id from ui if needed
|
# get params and add id from ui if needed
|
||||||
params = App.FormHandlerCoreWorkflow.cleanParams(params_ref)
|
params = App.FormHandlerCoreWorkflow.cleanParams(params_ref)
|
||||||
if ui?.params?.id
|
|
||||||
|
# add object id for edit screens
|
||||||
|
if ui?.params?.id && ui.screen.match(/edit/)
|
||||||
params.id = ui.params.id
|
params.id = ui.params.id
|
||||||
|
else
|
||||||
|
delete params.id
|
||||||
|
|
||||||
# skip double checks
|
# skip double checks
|
||||||
return if _.isEqual(coreWorkflowParams[classname], params)
|
return if _.isEqual(coreWorkflowParams[classname], params)
|
||||||
|
|
|
@ -771,4 +771,17 @@ RSpec.describe 'Ticket Create', type: :system do
|
||||||
expect(page).to have_no_text('mail002.box')
|
expect(page).to have_no_text('mail002.box')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
describe 'Invalid group and owner list for tickets created via customer profile #3835' do
|
||||||
|
let(:invalid_ticket) { create(:ticket) }
|
||||||
|
|
||||||
|
before do
|
||||||
|
visit "#ticket/create/id/#{invalid_ticket.id}/customer/#{User.find_by(firstname: 'Nicole').id}"
|
||||||
|
end
|
||||||
|
|
||||||
|
it 'does show an empty list of owners' do
|
||||||
|
wait(5).until { page.all('select[name=owner_id] option').count == 1 }
|
||||||
|
expect(page.all('select[name=owner_id] option').count).to eq(1)
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue