Fixes #3844 - No signature on new ticket if email is default message type.
This commit is contained in:
parent
47b72864be
commit
c8a09f6ce8
2 changed files with 36 additions and 10 deletions
|
@ -48,7 +48,15 @@ class App.TicketCreate extends App.Controller
|
||||||
if @ticket_id && @article_id
|
if @ticket_id && @article_id
|
||||||
@split = "/#{@ticket_id}/#{@article_id}"
|
@split = "/#{@ticket_id}/#{@article_id}"
|
||||||
|
|
||||||
|
@ajax(
|
||||||
|
type: 'GET'
|
||||||
|
url: "#{@apiPath}/ticket_create"
|
||||||
|
processData: true
|
||||||
|
success: (data, status, xhr) =>
|
||||||
|
App.Collection.loadAssets(data.assets)
|
||||||
|
@formMeta = data.form_meta
|
||||||
@buildScreen(params)
|
@buildScreen(params)
|
||||||
|
)
|
||||||
|
|
||||||
# rerender view, e. g. on langauge change
|
# rerender view, e. g. on langauge change
|
||||||
@controllerBind('ui:rerender', =>
|
@controllerBind('ui:rerender', =>
|
||||||
|
@ -271,6 +279,7 @@ class App.TicketCreate extends App.Controller
|
||||||
localeRender = =>
|
localeRender = =>
|
||||||
@render(template)
|
@render(template)
|
||||||
App.QueueManager.add(@queueKey, localeRender)
|
App.QueueManager.add(@queueKey, localeRender)
|
||||||
|
return if !@formMeta
|
||||||
App.QueueManager.run(@queueKey)
|
App.QueueManager.run(@queueKey)
|
||||||
|
|
||||||
updateTaskManagerAttachments: (attribute, attachments) =>
|
updateTaskManagerAttachments: (attribute, attachments) =>
|
||||||
|
@ -328,6 +337,7 @@ class App.TicketCreate extends App.Controller
|
||||||
model: App.Ticket
|
model: App.Ticket
|
||||||
screen: 'create_middle'
|
screen: 'create_middle'
|
||||||
handlersConfig: handlers
|
handlersConfig: handlers
|
||||||
|
formMeta: @formMeta
|
||||||
params: params
|
params: params
|
||||||
noFieldset: true
|
noFieldset: true
|
||||||
taskKey: @taskKey
|
taskKey: @taskKey
|
||||||
|
|
|
@ -813,4 +813,20 @@ RSpec.describe 'Ticket Create', type: :system do
|
||||||
find '.token', text: input # wait for email to tokenize
|
find '.token', text: input # wait for email to tokenize
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
describe 'No signature on new ticket if email is default message type #3844', authenticated_as: :authenticate do
|
||||||
|
def authenticate
|
||||||
|
Setting.set('ui_ticket_create_default_type', 'email-out')
|
||||||
|
Group.where.not(name: 'Users').each { |g| g.update(active: false) }
|
||||||
|
true
|
||||||
|
end
|
||||||
|
|
||||||
|
before do
|
||||||
|
visit 'ticket/create'
|
||||||
|
end
|
||||||
|
|
||||||
|
it 'does render the create screen with an initial core workflow state to set signatures and other defaults properly' do
|
||||||
|
expect(page.find('.richtext-content')).to have_text('Support')
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue