Fixed setting of tags via macros.

This commit is contained in:
Martin Edenhofer 2016-06-26 02:37:27 +02:00
parent b3b2a477dc
commit 682e019880
2 changed files with 35 additions and 3 deletions

View file

@ -578,13 +578,13 @@ class App.TicketZoom extends App.Controller
# apply tag changes
if attributes[1] is 'tags'
if @sidebar && @sidebar.edit && @sidebar.edit.tagWidget
if @sidebar && @sidebar.tagWidget
tags = content.value.split(',')
for tag in tags
if content.operator is 'remove'
@sidebar.edit.tagWidget.remove(tag)
@sidebar.tagWidget.remove(tag)
else
@sidebar.edit.tagWidget.add(tag)
@sidebar.tagWidget.add(tag)
# apply user changes
else if attributes[1] is 'owner_id'

View file

@ -615,4 +615,36 @@ class AgentTicketActionLevel8Test < TestCase
)
end
def test_d_macro
@browser = browser_instance
login(
username: 'agent1@example.com',
password: 'test',
url: browser_url,
)
tasks_close_all()
ticket1 = ticket_create(
data: {
customer: 'nico',
group: 'Users',
title: 'some subject - macro#1',
body: 'some body - macro#1',
},
)
click(css: '.active.content .js-submitDropdown .js-openDropdownMacro')
click(css: '.active.content .js-submitDropdown .js-dropdownActionMacro')
# verify tags
tags_verify(
tags: {
'spam' => true,
'tag1' => false,
}
)
end
end