Fixes #4088 - Wrong default values in ticket create when creating from user profile.
This commit is contained in:
parent
bb80177a02
commit
3f81df1925
2 changed files with 13 additions and 1 deletions
|
@ -246,7 +246,7 @@ class App.TicketCreate extends App.Controller
|
||||||
|
|
||||||
if _.isEmpty(params.ticket_id) && _.isEmpty(params.article_id)
|
if _.isEmpty(params.ticket_id) && _.isEmpty(params.article_id)
|
||||||
if !_.isEmpty(params.customer_id)
|
if !_.isEmpty(params.customer_id)
|
||||||
@renderQueue(options: params)
|
@renderQueue(options: _.omit(params, 'id'))
|
||||||
return
|
return
|
||||||
@renderQueue()
|
@renderQueue()
|
||||||
return
|
return
|
||||||
|
|
|
@ -946,4 +946,16 @@ RSpec.describe 'Ticket Create', type: :system do
|
||||||
wait.until { page.find("input[name='#{field_name}']", visible: :all).value == '' }
|
wait.until { page.find("input[name='#{field_name}']", visible: :all).value == '' }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
describe 'Wrong default values in ticket create when creating from user profile #4088' do
|
||||||
|
let(:customer) { create(:customer) }
|
||||||
|
|
||||||
|
before do
|
||||||
|
visit "ticket/create/customer/#{customer.id}"
|
||||||
|
end
|
||||||
|
|
||||||
|
it 'does show the default state when creating a ticket from a user profile' do
|
||||||
|
expect(page).to have_select('state_id', selected: 'open')
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue