Fixed issue #1770 - Owner reset after group selection (#1926)

This commit is contained in:
Mantas Masalskis 2018-05-08 09:46:28 +03:00 committed by Martin Edenhofer
parent ee20aa2a12
commit 57c1124a42
4 changed files with 61 additions and 0 deletions

View file

@ -259,6 +259,10 @@ class App.ControllerForm extends App.Controller
if attribute.name of @params
attribute.value = @params[attribute.name]
# set new value
if 'newValue' of attribute
attribute.value = attribute.newValue
App.Log.debug 'ControllerForm', 'formGenItem-before', attribute
if App.UiElement[attribute.tag]

View file

@ -20,6 +20,7 @@ class TicketZoomFormHanderDependencies
item['filter'] = {}
item['filter'][ fieldNameToChange ] = filter
item.default = params[item.name]
item.newValue = params[item.name]
#if !item.default
# delete item['default']
newElement = ui.formGenItem(item, classname, form)

View file

@ -41,6 +41,7 @@ if [ "$LEVEL" == '1' ]; then
rm test/browser/agent_ticket_update2_test.rb
rm test/browser/agent_ticket_update3_test.rb
rm test/browser/agent_ticket_update4_test.rb
rm test/browser/agent_ticket_update5_test.rb
rm test/browser/agent_ticket_update_and_reload_test.rb
rm test/browser/agent_user_manage_test.rb
rm test/browser/agent_user_profile_test.rb
@ -106,6 +107,7 @@ elif [ "$LEVEL" == '2' ]; then
# test/browser/agent_ticket_update2_test.rb
# test/browser/agent_ticket_update3_test.rb
# test/browser/agent_ticket_update4_test.rb
# rm test/browser/agent_ticket_update5_test.rb
# test/browser/agent_ticket_update_and_reload_test.rb
rm test/browser/agent_user_manage_test.rb
rm test/browser/agent_user_profile_test.rb
@ -171,6 +173,7 @@ elif [ "$LEVEL" == '3' ]; then
rm test/browser/agent_ticket_update2_test.rb
rm test/browser/agent_ticket_update3_test.rb
rm test/browser/agent_ticket_update4_test.rb
rm test/browser/agent_ticket_update5_test.rb
rm test/browser/agent_ticket_update_and_reload_test.rb
rm test/browser/agent_user_manage_test.rb
rm test/browser/agent_user_profile_test.rb
@ -236,6 +239,7 @@ elif [ "$LEVEL" == '4' ]; then
rm test/browser/agent_ticket_update2_test.rb
rm test/browser/agent_ticket_update3_test.rb
rm test/browser/agent_ticket_update4_test.rb
rm test/browser/agent_ticket_update5_test.rb
rm test/browser/agent_ticket_update_and_reload_test.rb
rm test/browser/agent_user_manage_test.rb
rm test/browser/agent_user_profile_test.rb
@ -300,6 +304,7 @@ elif [ "$LEVEL" == '5' ]; then
rm test/browser/agent_ticket_update2_test.rb
rm test/browser/agent_ticket_update3_test.rb
rm test/browser/agent_ticket_update4_test.rb
rm test/browser/agent_ticket_update5_test.rb
rm test/browser/agent_ticket_update_and_reload_test.rb
# test/browser/agent_user_manage_test.rb
# test/browser/agent_user_profile_test.rb
@ -367,6 +372,7 @@ elif [ "$LEVEL" == '6' ]; then
rm test/browser/agent_ticket_update2_test.rb
rm test/browser/agent_ticket_update3_test.rb
rm test/browser/agent_ticket_update4_test.rb
rm test/browser/agent_ticket_update5_test.rb
rm test/browser/agent_ticket_update_and_reload_test.rb
rm test/browser/agent_user_manage_test.rb
rm test/browser/agent_user_profile_test.rb

View file

@ -0,0 +1,50 @@
require 'browser_test_helper'
class AgentTicketUpdate5Test < TestCase
def test_check_changes
@browser = browser_instance
login(
username: 'agent1@example.com',
password: 'test',
url: browser_url,
)
# create ticket
ticket1 = ticket_create(
data: {
customer: 'Nico',
group: 'Users',
title: 'some changes',
body: 'some body 123äöü - changes',
}
)
select(
css: '.content.active .sidebar select[name="owner_id"]',
value: 'Agent 1 Test',
)
click(css: '.content.active .js-attributeBar .js-submit', wait: 2)
select(
css: '.content.active .sidebar select[name="group_id"]',
value: '-',
)
select(
css: '.content.active .sidebar select[name="group_id"]',
value: 'Users',
)
sleep 1
match(
css: '.content.active .sidebar select[name="owner_id"]',
value: '-'
)
end
end