From c1d663e4e4dc314f61f514fec00ad73ec29903c5 Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Mon, 13 Feb 2017 10:21:31 +0100 Subject: [PATCH] =?UTF-8?q?Fixed=20issue=20#719=20-=20Ticket=20without=20S?= =?UTF-8?q?ubject=20is=20blocked=20-=20can't=20do=20anything=20with=20it?= =?UTF-8?q?=20("Title=20needed=E2=80=9D).?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../javascripts/app/controllers/ticket_overview.coffee | 6 +++++- app/assets/javascripts/app/controllers/ticket_zoom.coffee | 8 +++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/app/assets/javascripts/app/controllers/ticket_overview.coffee b/app/assets/javascripts/app/controllers/ticket_overview.coffee index 158777f92..f230ebc09 100644 --- a/app/assets/javascripts/app/controllers/ticket_overview.coffee +++ b/app/assets/javascripts/app/controllers/ticket_overview.coffee @@ -1163,7 +1163,6 @@ class Table extends App.Controller bulkAll = @$('.table-overview').find('[name="bulk_all"]') checkedCount = @$('.table-overview').find('input[name="bulk"]:checked').length checkboxCount = @$('.table-overview').find('input[name="bulk"]').length - if checkedCount is 0 bulkAll.prop('indeterminate', false) bulkAll.prop('checked', false) @@ -1367,6 +1366,11 @@ class BulkForm extends App.Controller return ticket.load(ticket_update) + + # if title is empty - ticket can't processed, set ? + if _.isEmpty(ticket.title) + ticket.title = '-' + ticket.save( done: (r) => @bulk_count_index++ diff --git a/app/assets/javascripts/app/controllers/ticket_zoom.coffee b/app/assets/javascripts/app/controllers/ticket_zoom.coffee index 178e223d2..f702b06b0 100644 --- a/app/assets/javascripts/app/controllers/ticket_zoom.coffee +++ b/app/assets/javascripts/app/controllers/ticket_zoom.coffee @@ -691,11 +691,9 @@ class App.TicketZoom extends App.Controller if !ticket['owner_id'] ticket['owner_id'] = 1 - # check if title exists - if !ticket['title'] - alert( App.i18n.translateContent('Title needed') ) - @formEnable(e) - return + # if title is empty - ticket can't processed, set ? + if _.isEmpty(ticket.title) + ticket.title = '-' # stop autosave @autosaveStop()