Skip to content

Commit

Permalink
Fixed issue zammad#719 - Ticket without Subject is blocked - can't do…
Browse files Browse the repository at this point in the history
… anything with it ("Title needed”).
  • Loading branch information
martini committed Feb 13, 2017
1 parent bc60edd commit c1d663e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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++
Expand Down
8 changes: 3 additions & 5 deletions app/assets/javascripts/app/controllers/ticket_zoom.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit c1d663e

Please sign in to comment.