Fixed issue #2118 - A ticket created by customer via web with state new is set to open on second update by customer.
This commit is contained in:
parent
dd48e4dae5
commit
468b5bf12e
2 changed files with 19 additions and 2 deletions
|
@ -633,6 +633,11 @@ class App.TicketZoom extends App.Controller
|
|||
# and the default is was not set before
|
||||
return if @isDefaultFollowUpStateSet
|
||||
|
||||
# and only if ticket is not in "new" state
|
||||
if @ticket && @ticket.state_id
|
||||
state = App.TicketState.findByAttribute('id', @ticket.state_id)
|
||||
return if state && state.default_create is true
|
||||
|
||||
# prevent multiple changes for the default follow up state
|
||||
@isDefaultFollowUpStateSet = true
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
require 'browser_test_helper'
|
||||
|
||||
class CustomerTicketCreateTest < TestCase
|
||||
def test_customer_ticket_create
|
||||
def test_customer_ticket_create_and_verify_state_after_update
|
||||
@browser = browser_instance
|
||||
login(
|
||||
username: 'nicole.braun@zammad.org',
|
||||
|
@ -47,6 +47,12 @@ class CustomerTicketCreateTest < TestCase
|
|||
no_quote: true,
|
||||
)
|
||||
|
||||
# verify if the state has changed to open
|
||||
match(
|
||||
css: '.content.active .sidebar [name="state_id"]',
|
||||
value: 'new',
|
||||
)
|
||||
|
||||
# update ticket
|
||||
set(
|
||||
css: '.content.active [data-name="body"]',
|
||||
|
@ -65,6 +71,12 @@ class CustomerTicketCreateTest < TestCase
|
|||
value: 'some body 1234 äöüß',
|
||||
)
|
||||
|
||||
# check if the ticket state is new after update by customer
|
||||
match(
|
||||
css: '.content.active .sidebar [name="state_id"]',
|
||||
value: 'new',
|
||||
)
|
||||
|
||||
# now we want to verify the default followup state
|
||||
# for this case we close the ticket first and then
|
||||
# write a new article. If the content is written
|
||||
|
@ -153,7 +165,7 @@ class CustomerTicketCreateTest < TestCase
|
|||
)
|
||||
end
|
||||
|
||||
def test_customer_ticket_create_relogin_with_agent_ticket_crearte
|
||||
def test_customer_ticket_create_relogin_with_agent_ticket_create
|
||||
@browser = browser_instance
|
||||
login(
|
||||
username: 'nicole.braun@zammad.org',
|
||||
|
|
Loading…
Reference in a new issue