@@ -152,6 +152,7 @@ class Link < ApplicationModel
end
private
+
def self.link_type_get(data)
linktype = Link::Type.where( name: data[:name] ).first
if !linktype
@@ -12,6 +12,7 @@ class Observer::Ticket::CloseTime < ActiveRecord::Observer
def _check(record)
# puts 'check close time'
@@ -12,6 +12,7 @@ class Observer::Ticket::OnlineNotificationSeen < ActiveRecord::Observer
# return if we run import mode
@@ -51,6 +51,7 @@ class Setting < ApplicationModel
def delete_cache
@@current[:settings_config] = nil
@@ -10,6 +10,7 @@ class Sla < ApplicationModel
after_destroy :escalation_calculation_rebuild
def escalation_calculation_rebuild
Cache.delete( 'SLA::List::Active' )
Ticket::Escalation.rebuild_all
@@ -7,6 +7,7 @@ class Taskbar < ApplicationModel
before_update :update_last_contact, :set_user
def update_last_contact
self.last_contact = Time.now
@@ -26,6 +26,7 @@ class Token < ActiveRecord::Base
def generate_token
begin
self.name = SecureRandom.hex(20)
@@ -167,6 +167,7 @@ translate strings in ruby context, e. g. for notifications
def set_initial
return if target_initial
@@ -241,6 +241,7 @@ returns
def self.get_http(uri, options)
http = Net::HTTP.new(uri.host, uri.port)