diff --git a/app/assets/javascripts/app/controllers/agent_ticket_create.coffee b/app/assets/javascripts/app/controllers/agent_ticket_create.coffee index d29a9f7dd..f1a7aaf6e 100644 --- a/app/assets/javascripts/app/controllers/agent_ticket_create.coffee +++ b/app/assets/javascripts/app/controllers/agent_ticket_create.coffee @@ -135,6 +135,13 @@ class App.TicketCreate extends App.Controller @autosaveLast = data @log 'debug', 'form hash changed', diff, data App.TaskManager.update(@task_key, { 'state': data }) + + # check it task title in task need to be updated + title = @$('[name=title]').val() + if @latestTitle isnt title + @latestTitle = title + @metaTaskUpdate() + @interval(update, 3000, @id) # get data / in case also ticket data for split @@ -146,9 +153,9 @@ class App.TicketCreate extends App.Controller # fetch split ticket data @ajax( - id: 'ticket_split' + @task_key + id: "ticket_split#{@task_key}" type: 'GET' - url: @apiPath + '/ticket_split' + url: "#{@apiPath}/ticket_split" data: ticket_id: params.ticket_id article_id: params.article_id diff --git a/app/assets/javascripts/app/lib/app_post/task_manager.coffee b/app/assets/javascripts/app/lib/app_post/task_manager.coffee index 26a5e031e..00dd466f8 100644 --- a/app/assets/javascripts/app/lib/app_post/task_manager.coffee +++ b/app/assets/javascripts/app/lib/app_post/task_manager.coffee @@ -201,7 +201,9 @@ class _taskManagerSingleton extends App.Controller $('.nav-tab.task').each( (_index, element) => localElement = $(element) key = localElement.data('key') + return if !key task = @get(key) + return if !task if task.active localElement.addClass('is-active') else