Fixed keep body on reply again.
This commit is contained in:
parent
02548e8051
commit
98db7a1899
3 changed files with 78 additions and 15 deletions
|
@ -190,7 +190,7 @@ class App.TicketZoomArticleActions extends App.Controller
|
|||
articleNew.cc = addAddresses(articleNew.cc, article.cc)
|
||||
|
||||
# get current body
|
||||
body = @el.closest('[data-name="body"]').html() || ''
|
||||
body = @el.closest('.ticketZoom').find('.article-add [data-name="body"]').html() || ''
|
||||
|
||||
# check if quote need to be added
|
||||
selectedText = App.ClipBoard.getSelected()
|
||||
|
|
|
@ -95,7 +95,7 @@ class App.TicketZoomArticleNew extends App.Controller
|
|||
@bind(
|
||||
'ui::ticket::setArticleType'
|
||||
(data) =>
|
||||
if data.ticket.id is @ticket.id
|
||||
return if data.ticket.id isnt @ticket.id
|
||||
#@setArticleType(data.type.name)
|
||||
|
||||
@openTextarea(null, true)
|
||||
|
@ -106,14 +106,14 @@ class App.TicketZoomArticleNew extends App.Controller
|
|||
@$('[name="' + key + '"]').val(value)
|
||||
|
||||
# preselect article type
|
||||
@setArticleType( 'email' )
|
||||
@setArticleType('email')
|
||||
)
|
||||
|
||||
# reset new article screen
|
||||
@bind(
|
||||
'ui::ticket::taskReset'
|
||||
(data) =>
|
||||
if data.ticket_id is @ticket.id
|
||||
return if data.ticket_id isnt @ticket.id
|
||||
@type = 'note'
|
||||
@defaults = {}
|
||||
@render()
|
||||
|
|
63
test/browser/agent_ticket_actions_level7_test.rb
Normal file
63
test/browser/agent_ticket_actions_level7_test.rb
Normal file
|
@ -0,0 +1,63 @@
|
|||
# encoding: utf-8
|
||||
require 'browser_test_helper'
|
||||
|
||||
class AgentTicketActionLevel7Test < TestCase
|
||||
def test_reply_message_keep_body
|
||||
|
||||
# merge ticket with closed tab
|
||||
@browser = browser_instance
|
||||
login(
|
||||
username: 'agent1@example.com',
|
||||
password: 'test',
|
||||
url: browser_url,
|
||||
)
|
||||
tasks_close_all()
|
||||
|
||||
# create new ticket
|
||||
ticket1 = ticket_create(
|
||||
data: {
|
||||
customer: 'nico',
|
||||
group: 'Users',
|
||||
title: 'some subject 123äöü - reply test',
|
||||
body: 'some body 123äöü - reply test',
|
||||
},
|
||||
)
|
||||
sleep 1
|
||||
|
||||
# fill body
|
||||
ticket_update(
|
||||
data: {
|
||||
body: 'keep me',
|
||||
},
|
||||
do_not_submit: true,
|
||||
)
|
||||
|
||||
# click reply
|
||||
click( css: '.content.active [data-type="reply"]' )
|
||||
|
||||
# check body
|
||||
watch_for(
|
||||
css: '.content.active .js-reset',
|
||||
value: '(Discard your unsaved changes.|Verwerfen der)',
|
||||
no_quote: true,
|
||||
)
|
||||
|
||||
# check body
|
||||
ticket_verify(
|
||||
data: {
|
||||
body: 'keep me',
|
||||
},
|
||||
)
|
||||
|
||||
# click reply
|
||||
click( css: '.content.active [data-type="reply"]' )
|
||||
|
||||
# check body
|
||||
watch_for(
|
||||
css: '.content.active .js-reset',
|
||||
value: '(Discard your unsaved changes.|Verwerfen der)',
|
||||
no_quote: true,
|
||||
)
|
||||
|
||||
end
|
||||
end
|
Loading…
Reference in a new issue