diff --git a/app/assets/javascripts/app/models/ticket.coffee b/app/assets/javascripts/app/models/ticket.coffee index 6cfc91de0..37328b5da 100644 --- a/app/assets/javascripts/app/models/ticket.coffee +++ b/app/assets/javascripts/app/models/ticket.coffee @@ -30,8 +30,8 @@ class App.Ticket extends App.Model "#ticket/zoom/#{@id}" getState: -> - type = App.TicketState.find(@state_id) - stateType = App.TicketStateType.find(type.state_type_id) + type = App.TicketState.findNative(@state_id) + stateType = App.TicketStateType.findNative(type.state_type_id) state = 'closed' if stateType.name is 'new' || stateType.name is 'open' state = 'open' @@ -56,8 +56,8 @@ class App.Ticket extends App.Model @getState() iconTitle: -> - type = App.TicketState.find(@state_id) - stateType = App.TicketStateType.find(type.state_type_id) + type = App.TicketState.findNative(@state_id) + stateType = App.TicketStateType.findNative(type.state_type_id) if stateType.name is 'pending reminder' && @pending_time && new Date( Date.parse(@pending_time) ) < new Date return "#{App.i18n.translateInline(type.displayName())} - #{App.i18n.translateInline('reached')}" if @escalation_at && new Date( Date.parse(@escalation_at) ) < new Date diff --git a/app/assets/javascripts/app/models/ticket_article.coffee b/app/assets/javascripts/app/models/ticket_article.coffee index 99a89a957..0e0cca8e3 100644 --- a/app/assets/javascripts/app/models/ticket_article.coffee +++ b/app/assets/javascripts/app/models/ticket_article.coffee @@ -28,14 +28,14 @@ class App.TicketArticle extends App.Model if @subject return @subject if App.Ticket.exists(@ticket_id) - ticket = App.Ticket.find(@ticket_id) + ticket = App.Ticket.findNative(@ticket_id) if ticket return ticket.title '???' iconActivity: (user) -> return if !user - ticket = App.Ticket.find(@ticket_id) + ticket = App.Ticket.findNative(@ticket_id) if ticket.owner_id == user.id return 'important' '' diff --git a/app/assets/javascripts/app/models/user.coffee b/app/assets/javascripts/app/models/user.coffee index 31578811d..c650bcce4 100644 --- a/app/assets/javascripts/app/models/user.coffee +++ b/app/assets/javascripts/app/models/user.coffee @@ -279,7 +279,7 @@ class App.User extends App.Model if user_role_ids for role_id in user_role_ids if App.Role.exists(role_id) - role = App.Role.find(role_id) + role = App.Role.findNative(role_id) if role.group_ids for local_group_id, local_permission of role.group_ids if _.include(local_permission, permission) || _.include(local_permission, 'full')