diff --git a/app/assets/javascripts/app/controllers/ticket_zoom.coffee b/app/assets/javascripts/app/controllers/ticket_zoom.coffee index f52163f66..84a910347 100644 --- a/app/assets/javascripts/app/controllers/ticket_zoom.coffee +++ b/app/assets/javascripts/app/controllers/ticket_zoom.coffee @@ -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' diff --git a/test/browser/agent_ticket_actions_level8_test.rb b/test/browser/agent_ticket_actions_level8_test.rb index ada964fe9..ea1d19da8 100644 --- a/test/browser/agent_ticket_actions_level8_test.rb +++ b/test/browser/agent_ticket_actions_level8_test.rb @@ -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