     String.fromCharCode(bytes)
   
   parse: (ticket)->
+    ticket = super(ticket)
     if ticket.extendedAttributes
       ticket.sequence = +ticket.extendedAttributes['sequence']
       ticket.sequence = null if !ticket.sequence




class Scheduler.Tickets extends Backbone.Collection
  model: Scheduler.Ticket
  
  numbered: (numbers)->

class Scheduler.Ticket extends @Ticket
  urlRoot: '/scheduler/tickets'
  
  estimated: -> @tasks().every (task)-> +task.get('effort') > 0
  waitingForDiscussion: -> @get('unableToSetEstimatedEffort') or @get('unableToSetPriority')
  
  value: ->
    0
  
  tasks: -> @_tasks ?= new Scheduler.Tasks(@get('tasks'))
  
  addTask: (attributes)->
    xhr = $.post "/scheduler/tickets/#{@id}/tasks", attributes
