Maintenance: Refactor the remaining observers to concerns and drop the rails-observers dependency.

This commit is contained in:
Martin Gruner 2021-05-20 06:59:02 +00:00 committed by Thorsten Eckel
parent b72c01234a
commit fdbf501be0
39 changed files with 448 additions and 397 deletions

View file

@ -533,6 +533,7 @@ RSpec/MultipleExpectations:
- 'spec/models/object_manager/attribute_spec.rb'
- 'spec/models/overview_spec.rb'
- 'spec/models/scheduler_spec.rb'
- 'spec/models/session_spec.rb'
- 'spec/models/sla/has_escalation_calculation_impact_examples.rb'
- 'spec/models/smime_certificate_spec.rb'
- 'spec/models/taskbar_spec.rb'

View file

@ -155,8 +155,6 @@ Metrics/AbcSize:
- 'app/models/knowledge_base/search.rb'
- 'app/models/link.rb'
- 'app/models/object_manager/attribute.rb'
- 'app/models/observer/chat/leave/background_job.rb'
- 'app/models/observer/transaction.rb'
- 'app/models/online_notification.rb'
- 'app/models/online_notification/assets.rb'
- 'app/models/organization/assets.rb'
@ -349,6 +347,7 @@ Metrics/AbcSize:
- 'lib/stats/ticket_waiting_time.rb'
- 'lib/tasks/search_index_es.rake'
- 'lib/telegram.rb'
- 'lib/transaction_dispatcher.rb'
- 'lib/twitter_sync.rb'
- 'lib/user_agent.rb'
- 'lib/websocket_server.rb'
@ -423,6 +422,7 @@ Metrics/BlockLength:
- 'lib/sessions/client.rb'
- 'lib/tasks/search_index_es.rake'
- 'lib/tasks/zammad/ci/service/puma/start.rake'
- 'lib/transaction_dispatcher.rb'
- 'lib/twitter_sync.rb'
- 'script/websocket-server.rb'
- 'spec/**/*'
@ -653,6 +653,7 @@ Metrics/CyclomaticComplexity:
- 'lib/stats/ticket_waiting_time.rb'
- 'lib/tasks/search_index_es.rake'
- 'lib/telegram.rb'
- 'lib/transaction_dispatcher.rb'
- 'lib/twitter_sync.rb'
- 'lib/user_agent.rb'
- 'lib/websocket_server.rb'
@ -686,6 +687,7 @@ Metrics/ModuleLength:
- 'lib/sessions/node.rb'
- 'lib/signature_detection.rb'
- 'lib/static_assets.rb'
- 'lib/transaction_dispatcher.rb'
Metrics/PerceivedComplexity:
Exclude:
@ -878,6 +880,7 @@ Metrics/PerceivedComplexity:
- 'lib/stats/ticket_waiting_time.rb'
- 'lib/tasks/search_index_es.rake'
- 'lib/telegram.rb'
- 'lib/transaction_dispatcher.rb'
- 'lib/twitter_sync.rb'
- 'lib/user_agent.rb'
- 'test/browser/admin_object_manager_test.rb'

View file

@ -10,7 +10,6 @@ gem 'activerecord-session_store'
gem 'bootsnap', require: false
gem 'composite_primary_keys'
gem 'json'
gem 'rails-observers'
# core - application servers
gem 'puma', '~> 4', group: :puma

View file

@ -418,8 +418,6 @@ GEM
nokogiri (>= 1.6)
rails-html-sanitizer (1.3.0)
loofah (~> 2.3)
rails-observers (0.1.5)
activemodel (>= 4.0)
railties (5.2.4.6)
actionpack (= 5.2.4.6)
activesupport (= 5.2.4.6)
@ -654,7 +652,6 @@ DEPENDENCIES
rack-livereload
rails (= 5.2.4.6)
rails-controller-testing
rails-observers
rb-fsevent
rchardet (>= 1.8.0)
rspec-rails

View file

@ -13,7 +13,7 @@ module ApplicationController::HandlesTransitions
yield
Observer::Transaction.commit
TransactionDispatcher.commit
PushMessages.finish
ActiveSupport::Dependencies::Reference.clear!
ensure

View file

@ -140,7 +140,7 @@ class TicketArticleCommunicateEmailJob < ApplicationJob
end
# reopen ticket and notify agent
Observer::Transaction.reset
TransactionDispatcher.reset
UserInfo.current_user_id = 1
Ticket::Article.create!(
ticket_id: local_record.ticket_id,
@ -159,7 +159,7 @@ class TicketArticleCommunicateEmailJob < ApplicationJob
ticket = Ticket.find(local_record.ticket_id)
ticket.state = Ticket::State.find_by(default_follow_up: true)
ticket.save!
Observer::Transaction.commit
TransactionDispatcher.commit
UserInfo.current_user_id = nil
end

View file

@ -20,7 +20,7 @@ class TransactionJob < ApplicationJob
backend = Setting.get(setting.name)
next if params[:disable]&.include?(backend)
Observer::Transaction.execute_singel_backend(backend.constantize, item, params)
TransactionDispatcher.execute_single_backend(backend.constantize, item, params)
end
end
end

View file

@ -0,0 +1,11 @@
# Copyright (C) 2012-2016 Zammad Foundation, http://zammad-foundation.org/
module HasTransactionDispatcher
extend ActiveSupport::Concern
included do
after_create TransactionDispatcher
before_update TransactionDispatcher
end
end

View file

@ -1,26 +0,0 @@
# Copyright (C) 2012-2016 Zammad Foundation, http://zammad-foundation.org/
class Observer::Session < ActiveRecord::Observer
observe 'active_record::_session_store::_session'
def before_create(record)
check(record)
end
def before_update(record)
check(record)
end
# move the persistent attribute from the sub structure
# to the first level so it gets stored in the database
# column to make the cleanup lookup more performant
def check(record)
return if !record.data
return if record[:persistent]
return if !record.data['persistent']
record[:persistent] = record.data['persistent']
record.data.delete('persistent')
end
end

View file

@ -15,6 +15,8 @@ class Organization < ApplicationModel
include Organization::Search
include Organization::SearchIndex
include HasTransactionDispatcher
has_many :members, class_name: 'User'
has_many :tickets, class_name: 'Ticket'
belongs_to :created_by, class_name: 'User'

3
app/models/session.rb Normal file
View file

@ -0,0 +1,3 @@
class Session < ActiveRecord::SessionStore::Session
include Session::SetsPersistentFlag
end

View file

@ -0,0 +1,26 @@
# Copyright (C) 2012-2016 Zammad Foundation, http://zammad-foundation.org/
module Session::SetsPersistentFlag
extend ActiveSupport::Concern
included do
before_create :session_set_persistent_flag
before_update :session_set_persistent_flag
end
private
# move the persistent attribute from the sub structure
# to the first level so it gets stored in the database
# column to make the cleanup lookup more performant
def session_set_persistent_flag
return if !data
return if self[:persistent]
return if !data['persistent']
self[:persistent] = data['persistent']
data.delete('persistent')
end
end

View file

@ -2,6 +2,7 @@
class Tag < ApplicationModel
include Tag::WritesToTicketHistory
include HasTransactionDispatcher
belongs_to :tag_object, class_name: 'Tag::Object', optional: true
belongs_to :tag_item, class_name: 'Tag::Item', optional: true

View file

@ -36,6 +36,8 @@ class Ticket < ApplicationModel
# This must be loaded late as it depends on the internal before_create and before_update handlers of ticket.rb.
include Ticket::SetsLastOwnerUpdateTime
include HasTransactionDispatcher
validates :group_id, presence: true
activity_stream_permission 'ticket.agent'
@ -1355,7 +1357,7 @@ perform active triggers on ticket
ticket.perform_changes(trigger, 'trigger', item, user_id)
if recursive == true
Observer::Transaction.commit(local_options)
TransactionDispatcher.commit(local_options)
end
end
end

View file

@ -23,6 +23,8 @@ class Ticket::Article < ApplicationModel
include Ticket::Article::AddsMetadataGeneral
include Ticket::Article::AddsMetadataEmail
include HasTransactionDispatcher
belongs_to :ticket, optional: true
has_one :ticket_time_accounting, class_name: 'Ticket::TimeAccounting', foreign_key: :ticket_article_id, dependent: :destroy, inverse_of: :ticket_article
belongs_to :type, class_name: 'Ticket::Article::Type', optional: true

View file

@ -16,7 +16,7 @@ class Transaction
if options[:interface_handle]
ApplicationHandleInfo.current = original_interface_handle
end
Observer::Transaction.commit(options)
TransactionDispatcher.commit(options)
PushMessages.finish
end
return if options[:bulk] != true

View file

@ -39,7 +39,7 @@ class Transaction::ClearbitEnrichment
user_enrichment = Enrichment::Clearbit::User.new(user)
return if !user_enrichment.synced?
Observer::Transaction.commit
TransactionDispatcher.commit
true
end
end

View file

@ -23,6 +23,8 @@ class User < ApplicationModel
include User::PerformsGeoLookup
include User::UpdatesTicketOrganization
include HasTransactionDispatcher
has_and_belongs_to_many :organizations, after_add: :cache_update, after_remove: :cache_update, class_name: 'Organization'
has_and_belongs_to_many :overviews, dependent: :nullify
has_many :tokens, after_add: :cache_update, after_remove: :cache_update, dependent: :destroy

View file

@ -23,12 +23,6 @@ module Zammad
config.autoload_paths += %W[#{config.root}/lib]
config.eager_load_paths += %W[#{config.root}/lib]
# Activate observers that should always be running.
# config.active_record.observers = :cacher, :garbage_collector, :forum_observer
config.active_record.observers =
'observer::_session',
'observer::_transaction'
config.active_job.queue_adapter = :delayed_job
# Use custom logger to log Thread id next to Process pid

View file

@ -1,7 +1,6 @@
# Copyright (C) 2012-2016 Zammad Foundation, http://zammad-foundation.org/
class Observer::Transaction < ActiveRecord::Observer
observe :ticket, 'ticket::_article', :user, :organization, :tag
class TransactionDispatcher
def self.reset
EventBuffer.reset('transaction')
@ -15,7 +14,7 @@ class Observer::Transaction < ActiveRecord::Observer
params[:interface_handle] = ApplicationHandleInfo.current
# execute object transactions
Observer::Transaction.perform(params)
TransactionDispatcher.perform(params)
end
def self.perform(params)
@ -45,7 +44,7 @@ class Observer::Transaction < ActiveRecord::Observer
# execute sync backends
sync_backends.each do |backend|
execute_singel_backend(backend, item, params)
execute_single_backend(backend, item, params)
end
# execute async backends
@ -54,8 +53,8 @@ class Observer::Transaction < ActiveRecord::Observer
end
end
def self.execute_singel_backend(backend, item, params)
Rails.logger.debug { "Execute singel backend #{backend}" }
def self.execute_single_backend(backend, item, params)
Rails.logger.debug { "Execute single backend #{backend}" }
begin
UserInfo.current_user_id = nil
integration = backend.new(item, params)
@ -176,7 +175,8 @@ class Observer::Transaction < ActiveRecord::Observer
list_objects
end
def after_create(record)
# Used as ActiveRecord lifecycle callback on the class.
def self.after_create(record)
# return if we run import mode
return true if Setting.get('import_mode')
@ -193,7 +193,8 @@ class Observer::Transaction < ActiveRecord::Observer
true
end
def before_update(record)
# Used as ActiveRecord lifecycle callback on the class.
def self.before_update(record)
# return if we run import mode
return true if Setting.get('import_mode')

View file

@ -10,6 +10,7 @@ module Zammad
SESSION_KEY = "_zammad_session_#{Digest::MD5.hexdigest(Rails.root.to_s)[5..15]}".freeze # default: '_zammad_session'
def self.perform
ActionDispatch::Session::ActiveRecordStore.session_class = Session
Rails.application.config.session_store STORE_TYPE,
key: SESSION_KEY,
secure: secure?

View file

@ -271,7 +271,7 @@ RSpec.describe Cti::CallerId do
context 'with maybe caller_id' do
let(:ticket1) do
create(:ticket_article, created_by_id: customer2.id, body: 'some text 0123457') # create ticket
Observer::Transaction.commit
TransactionDispatcher.commit
Scheduler.worker(true)
end
let!(:customer2) { create(:customer) }

View file

@ -257,7 +257,7 @@ RSpec.describe Cti::Log do
let(:customer_of_ticket) { create(:customer) }
let(:ticket_sample) do
create(:ticket_article, created_by_id: customer_of_ticket.id, body: 'some text 0123457')
Observer::Transaction.commit
TransactionDispatcher.commit
Scheduler.worker(true)
end
let(:caller_id) { '0123456' }

View file

@ -0,0 +1,32 @@
require 'rails_helper'
RSpec.describe Session, type: :model do
describe 'Check that session creation' do
context 'without persistent flag in data payload' do
subject(:session) { described_class.create( session_id: SecureRandom.urlsafe_base64(64), data: {} ) }
it 'does not set the persistent attribute' do
expect(session.persistent).to be_nil()
end
end
context 'with true persistent flag in data payload' do
subject(:session) { described_class.create( session_id: SecureRandom.urlsafe_base64(64), data: { 'persistent' => true }) }
it 'sets the persistent attribute in the session and removes the persistent attribute from the data payload' do
expect(session.persistent).to eq(true)
expect(session.persistent).to eq(true)
end
end
context 'with false persistent flag in data payload' do
subject(:session) { described_class.create( session_id: SecureRandom.urlsafe_base64(64), data: { 'persistent' => false }) }
it 'does not set the persistent attribute' do
expect(session.persistent).to be_nil()
end
end
end
end

View file

@ -338,7 +338,7 @@ RSpec.describe Ticket::Article, type: :model do
it 'does not modify any Log records (because CallerIds from article bodies have #level "maybe")' do
expect do
article.save
Observer::Transaction.commit
TransactionDispatcher.commit
Scheduler.worker(true)
end.not_to change { log.reload.attributes }
end

View file

@ -1381,7 +1381,7 @@ RSpec.describe Ticket, type: :model do
expect(Cti::CallerId).to receive(:build).with(ticket)
ticket.save
Observer::Transaction.commit
TransactionDispatcher.commit
Scheduler.worker(true)
end
end
@ -1584,7 +1584,7 @@ RSpec.describe Ticket, type: :model do
end
it 'fires triggers before new ticket notifications are sent' do
expect { Observer::Transaction.commit }
expect { TransactionDispatcher.commit }
.to change { ticket.reload.group }.to(group)
expect { Scheduler.worker(true) }
@ -1634,12 +1634,12 @@ RSpec.describe Ticket, type: :model do
create(:mention, mentionable: ticket, user: user_only_mentions)
create(:mention, mentionable: ticket, user: user_read_mentions)
create(:mention, mentionable: ticket, user: user_no_mentions)
Observer::Transaction.commit
TransactionDispatcher.commit
Scheduler.worker(true)
check_notification do
ticket.update(priority: Ticket::Priority.find_by(name: '3 high'))
Observer::Transaction.commit
TransactionDispatcher.commit
Scheduler.worker(true)
sent(
template: 'ticket_update',
@ -1658,12 +1658,12 @@ RSpec.describe Ticket, type: :model do
it 'does not inform mention user about the ticket update' do
ticket
Observer::Transaction.commit
TransactionDispatcher.commit
Scheduler.worker(true)
check_notification do
ticket.update(priority: Ticket::Priority.find_by(name: '3 high'))
Observer::Transaction.commit
TransactionDispatcher.commit
Scheduler.worker(true)
sent(
template: 'ticket_update',
@ -1685,7 +1685,7 @@ RSpec.describe Ticket, type: :model do
ticket = create(:ticket, owner: user_no_mentions, group: mention_group)
create(:mention, mentionable: ticket, user: user_read_mentions)
create(:mention, mentionable: ticket, user: user_only_mentions)
Observer::Transaction.commit
TransactionDispatcher.commit
Scheduler.worker(true)
sent(
template: 'ticket_create',
@ -1705,7 +1705,7 @@ RSpec.describe Ticket, type: :model do
it 'does not inform mention user about ticket creation' do
check_notification do
create(:ticket, owner: user_no_mentions, group: mention_group)
Observer::Transaction.commit
TransactionDispatcher.commit
Scheduler.worker(true)
sent(
template: 'ticket_create',
@ -1727,7 +1727,7 @@ RSpec.describe Ticket, type: :model do
ticket = create(:ticket, group: no_access_group)
create(:mention, mentionable: ticket, user: user_read_mentions)
create(:mention, mentionable: ticket, user: user_only_mentions)
Observer::Transaction.commit
TransactionDispatcher.commit
Scheduler.worker(true)
not_sent(
template: 'ticket_create',

View file

@ -33,7 +33,7 @@ RSpec.describe Trigger do
let(:agent) { create(:agent) }
let(:ticket) do
ticket = create(:ticket, group: Group.lookup(id: 1), created_by_id: agent.id)
Observer::Transaction.commit
TransactionDispatcher.commit
ticket
end
@ -72,7 +72,7 @@ RSpec.describe Trigger do
let(:ticket) do
ticket = create(:ticket, group: ticket_group, created_by_id: create(:agent).id)
Observer::Transaction.commit
TransactionDispatcher.commit
ticket
end

View file

@ -60,7 +60,7 @@ RSpec.describe Trigger, type: :model do
let!(:ticket) { create(:ticket) }
it 'fires (without altering ticket state)' do
expect { Observer::Transaction.commit }
expect { TransactionDispatcher.commit }
.to change(Ticket::Article, :count).by(1)
.and not_change { ticket.reload.state.name }.from('new')
end
@ -89,7 +89,7 @@ RSpec.describe Trigger, type: :model do
end
it 'fires body with replaced tags' do
Observer::Transaction.commit
TransactionDispatcher.commit
expect(Ticket::Article.last.body).to eq('some body with t1, t2, t3')
end
end
@ -161,7 +161,7 @@ RSpec.describe Trigger, type: :model do
}
end
before { Observer::Transaction.commit }
before { TransactionDispatcher.commit }
context 'mix of recipient group keyword and single recipient users' do
let(:recipient) { [ 'ticket_customer', "userid_#{recipient1.id}", "userid_#{recipient2.id}", "userid_#{recipient3.id}" ] }
@ -244,7 +244,7 @@ RSpec.describe Trigger, type: :model do
context 'sending articles' do
before do
Observer::Transaction.commit
TransactionDispatcher.commit
end
context 'expired certificate' do
@ -347,7 +347,7 @@ RSpec.describe Trigger, type: :model do
let(:group) { create(:group) }
it 'does not fire' do
expect { Observer::Transaction.commit }
expect { TransactionDispatcher.commit }
.to change(Ticket::Article, :count).by(0)
end
end
@ -365,7 +365,7 @@ RSpec.describe Trigger, type: :model do
let(:customer) { create(:customer) }
it 'does not fire' do
expect { Observer::Transaction.commit }
expect { TransactionDispatcher.commit }
.to change(Ticket::Article, :count).by(0)
end
end
@ -386,7 +386,7 @@ RSpec.describe Trigger, type: :model do
let(:group) { create(:group) }
it 'does not fire' do
expect { Observer::Transaction.commit }
expect { TransactionDispatcher.commit }
.to change(Ticket::Article, :count).by(0)
end
end
@ -405,7 +405,7 @@ RSpec.describe Trigger, type: :model do
let(:customer) { create(:customer) }
it 'does not fire' do
expect { Observer::Transaction.commit }
expect { TransactionDispatcher.commit }
.to change(Ticket::Article, :count).by(0)
end
end
@ -420,14 +420,14 @@ RSpec.describe Trigger, type: :model do
{ 'ticket.action' => { 'operator' => 'is', 'value' => 'update' } }
end
let!(:ticket) { create(:ticket).tap { Observer::Transaction.commit } }
let!(:ticket) { create(:ticket).tap { TransactionDispatcher.commit } }
context 'when new article is created directly' do
context 'with empty #preferences hash' do
let!(:article) { create(:ticket_article, ticket: ticket) }
it 'fires (without altering ticket state)' do
expect { Observer::Transaction.commit }
expect { TransactionDispatcher.commit }
.to change { ticket.reload.articles.count }.by(1)
.and not_change { ticket.reload.state.name }.from('new')
end
@ -441,7 +441,7 @@ RSpec.describe Trigger, type: :model do
end
it 'does not fire' do
expect { Observer::Transaction.commit }
expect { TransactionDispatcher.commit }
.not_to change { ticket.reload.articles.count }
end
end
@ -497,12 +497,12 @@ RSpec.describe Trigger, type: :model do
it 'does trigger only in working time' do
travel_to Time.zone.parse('2020-02-12T12:00:00Z0')
expect { Observer::Transaction.commit }.to change { ticket.reload.title }.to('triggered')
expect { TransactionDispatcher.commit }.to change { ticket.reload.title }.to('triggered')
end
it 'does not trigger out of working time' do
travel_to Time.zone.parse('2020-02-12T02:00:00Z0')
Observer::Transaction.commit
TransactionDispatcher.commit
expect(ticket.reload.title).to eq('Test Ticket')
end
end
@ -514,13 +514,13 @@ RSpec.describe Trigger, type: :model do
it 'does not trigger in working time' do
travel_to Time.zone.parse('2020-02-12T12:00:00Z0')
Observer::Transaction.commit
TransactionDispatcher.commit
expect(ticket.reload.title).to eq('Test Ticket')
end
it 'does trigger out of working time' do
travel_to Time.zone.parse('2020-02-12T02:00:00Z0')
expect { Observer::Transaction.commit }.to change { ticket.reload.title }.to('triggered')
expect { TransactionDispatcher.commit }.to change { ticket.reload.title }.to('triggered')
end
end
end
@ -551,7 +551,7 @@ RSpec.describe Trigger, type: :model do
end
it 'does not trigger because of the last article is created my system address' do
expect { Observer::Transaction.commit }.to change { ticket.reload.articles.count }.by(0)
expect { TransactionDispatcher.commit }.to change { ticket.reload.articles.count }.by(0)
expect(Ticket::Article.where(ticket: ticket).last.subject).not_to eq('foo last sender')
expect(Ticket::Article.where(ticket: ticket).last.to).not_to eq(system_address.email)
end
@ -566,7 +566,7 @@ RSpec.describe Trigger, type: :model do
end
it 'does not trigger because of the last article is created my system address' do
expect { Observer::Transaction.commit }.to change { ticket.reload.articles.count }.by(0)
expect { TransactionDispatcher.commit }.to change { ticket.reload.articles.count }.by(0)
expect(Ticket::Article.where(ticket: ticket).last.subject).not_to eq('foo last sender')
expect(Ticket::Article.where(ticket: ticket).last.to).not_to eq(system_address.email)
end
@ -602,7 +602,7 @@ RSpec.describe Trigger, type: :model do
it "for #{attribute}" do
ticket && trigger
expect { Observer::Transaction.commit }.to change { ticket.reload.title }.to('triggered')
expect { TransactionDispatcher.commit }.to change { ticket.reload.title }.to('triggered')
end
end
@ -661,7 +661,7 @@ RSpec.describe Trigger, type: :model do
context 'in alphabetical order (by name)' do
it 'fires all triggers in sequence' do
expect { Observer::Transaction.commit }
expect { TransactionDispatcher.commit }
.to change { ticket.reload.state.name }.to('merged')
end
end
@ -677,7 +677,7 @@ RSpec.describe Trigger, type: :model do
before { Setting.set('ticket_trigger_recursive', true) }
it 'evaluates triggers in sequence, then loops back to the start and re-evalutes skipped triggers' do
expect { Observer::Transaction.commit }
expect { TransactionDispatcher.commit }
.to change { ticket.reload.state.name }.to('merged')
end
end
@ -686,7 +686,7 @@ RSpec.describe Trigger, type: :model do
before { Setting.set('ticket_trigger_recursive', false) }
it 'evaluates triggers in sequence, firing only the ones that match' do
expect { Observer::Transaction.commit }
expect { TransactionDispatcher.commit }
.to change { ticket.reload.state.name }.to('closed')
end
end
@ -734,7 +734,7 @@ RSpec.describe Trigger, type: :model do
before { Setting.set('ticket_trigger_recursive', true) }
it 'fires each trigger once, without being caught in an endless loop' do
expect { Timeout.timeout(2) { Observer::Transaction.commit } }
expect { Timeout.timeout(2) { TransactionDispatcher.commit } }
.to not_change { ticket.reload.priority.name }
.and not_raise_error
end
@ -744,7 +744,7 @@ RSpec.describe Trigger, type: :model do
before { Setting.set('ticket_trigger_recursive', false) }
it 'fires each trigger once, without being caught in an endless loop' do
expect { Timeout.timeout(2) { Observer::Transaction.commit } }
expect { Timeout.timeout(2) { TransactionDispatcher.commit } }
.to not_change { ticket.reload.priority.name }
.and not_raise_error
end
@ -788,7 +788,7 @@ RSpec.describe Trigger, type: :model do
end
it 'evaluates triggers in sequence, firing only the ones that match' do
expect { Observer::Transaction.commit }
expect { TransactionDispatcher.commit }
.to change { ticket.reload.state.name }.to('open')
.and not_change { ticket.reload.priority.name }
end

View file

@ -1239,7 +1239,7 @@ RSpec.describe User, type: :model do
it 'populates #preferences[:from] hash in all associated Log records (in a bg job)' do
expect do
user.save
Observer::Transaction.commit
TransactionDispatcher.commit
Scheduler.worker(true)
end.to change { log.reload.preferences[:from]&.first }
.to(hash_including('caller_id' => user.phone))
@ -1252,7 +1252,7 @@ RSpec.describe User, type: :model do
it 'populates #preferences[:from] hash in all associated Log records (in a bg job)' do
expect do
user.update(phone: log.from)
Observer::Transaction.commit
TransactionDispatcher.commit
Scheduler.worker(true)
end.to change { log.reload.preferences[:from]&.first }
.to(hash_including('object' => 'User', 'o_id' => user.id))
@ -1265,7 +1265,7 @@ RSpec.describe User, type: :model do
it 'does not modify any Log records' do
expect do
user.save
Observer::Transaction.commit
TransactionDispatcher.commit
Scheduler.worker(true)
end.not_to change { log.reload.attributes }
end
@ -1277,7 +1277,7 @@ RSpec.describe User, type: :model do
it 'does not modify any Log records' do
expect do
user.save
Observer::Transaction.commit
TransactionDispatcher.commit
Scheduler.worker(true)
end.not_to change { log.reload.attributes }
end
@ -1294,7 +1294,7 @@ RSpec.describe User, type: :model do
it 'empties #preferences[:from] hash in all associated Log records (in a bg job)' do
expect do
user.update(phone: '0123456789')
Observer::Transaction.commit
TransactionDispatcher.commit
Scheduler.worker(true)
end.to change { logs.map(&:reload).map { |log| log.preferences[:from] } }
.to(Array.new(5) { nil })
@ -1305,7 +1305,7 @@ RSpec.describe User, type: :model do
it 'empties #preferences[:from] hash in all associated Log records (in a bg job)' do
expect do
user.update(phone: '')
Observer::Transaction.commit
TransactionDispatcher.commit
Scheduler.worker(true)
end.to change { logs.map(&:reload).map { |log| log.preferences[:from] } }
.to(Array.new(5) { nil })
@ -1316,7 +1316,7 @@ RSpec.describe User, type: :model do
it 'empties #preferences[:from] hash in all associated Log records (in a bg job)' do
expect do
user.update(phone: nil)
Observer::Transaction.commit
TransactionDispatcher.commit
Scheduler.worker(true)
end.to change { logs.map(&:reload).map { |log| log.preferences[:from] } }
.to(Array.new(5) { nil })
@ -1328,7 +1328,7 @@ RSpec.describe User, type: :model do
it 'does not modify any Log records' do
expect do
user.update(mobile: '2345678901')
Observer::Transaction.commit
TransactionDispatcher.commit
Scheduler.worker(true)
end.not_to change { logs.map(&:reload).map(&:attributes) }
end

View file

@ -159,7 +159,7 @@ RSpec.describe 'Twilio SMS', type: :request do
expect(article.preferences[:delivery_retry]).to be_nil
expect(article.preferences[:delivery_status]).to be_nil
Observer::Transaction.commit
TransactionDispatcher.commit
Scheduler.worker(true)
article = Ticket::Article.find(json_response['id'])
@ -175,7 +175,7 @@ RSpec.describe 'Twilio SMS', type: :request do
email: 'me@example.com',
mobile: '01710000000',
)
Observer::Transaction.commit
TransactionDispatcher.commit
Scheduler.worker(true)
UserInfo.current_user_id = 1

View file

@ -46,7 +46,7 @@ class ClearbitTest < ActiveSupport::TestCase
)
assert(customer1)
Observer::Transaction.commit
TransactionDispatcher.commit
Scheduler.worker(true)
assert(ExternalSync.find_by(source: 'clearbit', object: 'User', o_id: customer1.id))
@ -74,7 +74,7 @@ class ClearbitTest < ActiveSupport::TestCase
)
assert(customer2)
Observer::Transaction.commit
TransactionDispatcher.commit
Scheduler.worker(true)
assert(ExternalSync.find_by(source: 'clearbit', object: 'User', o_id: customer2.id))
@ -97,7 +97,7 @@ class ClearbitTest < ActiveSupport::TestCase
note: 'changed by my self',
)
Observer::Transaction.commit
TransactionDispatcher.commit
Scheduler.worker(true)
assert(ExternalSync.find_by(source: 'clearbit', object: 'User', o_id: customer2.id))
@ -169,7 +169,7 @@ class ClearbitTest < ActiveSupport::TestCase
)
assert(customer3)
Observer::Transaction.commit
TransactionDispatcher.commit
Scheduler.worker(true)
assert_not(ExternalSync.find_by(source: 'clearbit', object: 'User', o_id: customer3.id))
@ -199,7 +199,7 @@ class ClearbitTest < ActiveSupport::TestCase
)
assert(customer4)
Observer::Transaction.commit
TransactionDispatcher.commit
Scheduler.worker(true)
assert(ExternalSync.find_by(source: 'clearbit', object: 'User', o_id: customer4.id))
@ -227,7 +227,7 @@ class ClearbitTest < ActiveSupport::TestCase
)
assert(customer5)
Observer::Transaction.commit
TransactionDispatcher.commit
Scheduler.worker(true)
assert(ExternalSync.find_by(source: 'clearbit', object: 'User', o_id: customer5.id))
@ -257,7 +257,7 @@ class ClearbitTest < ActiveSupport::TestCase
)
assert(customer6)
Observer::Transaction.commit
TransactionDispatcher.commit
Scheduler.worker(true)
assert_not(ExternalSync.find_by(source: 'clearbit', object: 'User', o_id: customer6.id))
@ -326,7 +326,7 @@ class ClearbitTest < ActiveSupport::TestCase
)
assert(customer1)
Observer::Transaction.commit
TransactionDispatcher.commit
Scheduler.worker(true)
assert(ExternalSync.find_by(source: 'clearbit', object: 'User', o_id: customer1.id))

View file

@ -67,7 +67,7 @@ class SlackTest < ActiveSupport::TestCase
created_by_id: 1,
)
Observer::Transaction.commit
TransactionDispatcher.commit
Scheduler.worker(true)
# check if message exists
@ -76,7 +76,7 @@ class SlackTest < ActiveSupport::TestCase
ticket1.state = Ticket::State.find_by(name: 'open')
ticket1.save
Observer::Transaction.commit
TransactionDispatcher.commit
Scheduler.worker(true)
# check if message exists
@ -105,7 +105,7 @@ class SlackTest < ActiveSupport::TestCase
created_by_id: 1,
)
Observer::Transaction.commit
TransactionDispatcher.commit
Scheduler.worker(true)
# check if message exists
@ -117,7 +117,7 @@ class SlackTest < ActiveSupport::TestCase
ticket2.title = text
ticket2.save
Observer::Transaction.commit
TransactionDispatcher.commit
Scheduler.worker(true)
# check if message exists
@ -127,7 +127,7 @@ class SlackTest < ActiveSupport::TestCase
ticket2.pending_time = Time.zone.now - 2.days
ticket2.save
Observer::Transaction.commit
TransactionDispatcher.commit
Scheduler.worker(true)
# check if message exists
@ -135,7 +135,7 @@ class SlackTest < ActiveSupport::TestCase
Ticket.process_pending
Observer::Transaction.commit
TransactionDispatcher.commit
Scheduler.worker(true)
# check if message exists
@ -143,7 +143,7 @@ class SlackTest < ActiveSupport::TestCase
Ticket.process_pending
Observer::Transaction.commit
TransactionDispatcher.commit
Scheduler.worker(true)
# check if message exists
@ -186,7 +186,7 @@ class SlackTest < ActiveSupport::TestCase
created_by_id: 1,
)
Observer::Transaction.commit
TransactionDispatcher.commit
Scheduler.worker(true)
# check if message exists
@ -195,7 +195,7 @@ class SlackTest < ActiveSupport::TestCase
ticket3.state = Ticket::State.find_by(name: 'open')
ticket3.save
Observer::Transaction.commit
TransactionDispatcher.commit
Scheduler.worker(true)
# check if message exists
@ -224,7 +224,7 @@ class SlackTest < ActiveSupport::TestCase
created_by_id: 1,
)
Observer::Transaction.commit
TransactionDispatcher.commit
Scheduler.worker(true)
# check if message exists
@ -236,7 +236,7 @@ class SlackTest < ActiveSupport::TestCase
ticket4.title = text
ticket4.save
Observer::Transaction.commit
TransactionDispatcher.commit
Scheduler.worker(true)
# check if message exists

View file

@ -610,7 +610,7 @@ Some Text'
# move ticket
ticket.group = group1
ticket.save
Observer::Transaction.commit
TransactionDispatcher.commit
data = "From: me@example.com
To: customer@example.com

View file

@ -71,7 +71,7 @@ class KarmaTest < ActiveSupport::TestCase
assert(ticket1)
# execute object transaction
Observer::Transaction.commit
TransactionDispatcher.commit
Scheduler.worker(true)
assert_equal(10, Karma.score_by_user(agent1))
@ -93,7 +93,7 @@ class KarmaTest < ActiveSupport::TestCase
ticket1.save!
# execute object transaction
Observer::Transaction.commit
TransactionDispatcher.commit
Scheduler.worker(true)
assert_equal(10 + 2, Karma.score_by_user(agent1))
@ -115,7 +115,7 @@ class KarmaTest < ActiveSupport::TestCase
ticket1.save!
# execute object transaction
Observer::Transaction.commit
TransactionDispatcher.commit
Scheduler.worker(true)
assert_equal(10 + 2, Karma.score_by_user(agent1))
@ -129,7 +129,7 @@ class KarmaTest < ActiveSupport::TestCase
ticket1.save!
# execute object transaction
Observer::Transaction.commit
TransactionDispatcher.commit
Scheduler.worker(true)
assert_equal(10 + 2, Karma.score_by_user(agent1))
@ -156,7 +156,7 @@ class KarmaTest < ActiveSupport::TestCase
)
# execute object transaction
Observer::Transaction.commit
TransactionDispatcher.commit
Scheduler.worker(true)
assert_equal(10 + 2, Karma.score_by_user(agent1))
@ -164,14 +164,14 @@ class KarmaTest < ActiveSupport::TestCase
assert_equal(0, Karma.score_by_user(customer1))
# execute object transaction
Observer::Transaction.commit
TransactionDispatcher.commit
Scheduler.worker(true)
ticket1.state = Ticket::State.lookup(name: 'closed')
ticket1.save!
# execute object transaction
Observer::Transaction.commit
TransactionDispatcher.commit
Scheduler.worker(true)
assert_equal(10 + 2, Karma.score_by_user(agent1))
@ -195,7 +195,7 @@ class KarmaTest < ActiveSupport::TestCase
)
# execute object transaction
Observer::Transaction.commit
TransactionDispatcher.commit
Scheduler.worker(true)
assert_equal(10 + 2, Karma.score_by_user(agent1))
@ -219,7 +219,7 @@ class KarmaTest < ActiveSupport::TestCase
)
# execute object transaction
Observer::Transaction.commit
TransactionDispatcher.commit
Scheduler.worker(true)
assert_equal(10 + 2 + 25, Karma.score_by_user(agent1))
@ -243,7 +243,7 @@ class KarmaTest < ActiveSupport::TestCase
)
# execute object transaction
Observer::Transaction.commit
TransactionDispatcher.commit
Scheduler.worker(true)
assert_equal(10 + 2 + 25, Karma.score_by_user(agent1))
@ -267,7 +267,7 @@ class KarmaTest < ActiveSupport::TestCase
)
# execute object transaction
Observer::Transaction.commit
TransactionDispatcher.commit
Scheduler.worker(true)
assert_equal(10 + 2 + 25, Karma.score_by_user(agent1))
@ -291,7 +291,7 @@ class KarmaTest < ActiveSupport::TestCase
)
# execute object transaction
Observer::Transaction.commit
TransactionDispatcher.commit
Scheduler.worker(true)
assert_equal(10 + 2 + 25, Karma.score_by_user(agent1))
@ -315,7 +315,7 @@ class KarmaTest < ActiveSupport::TestCase
)
# execute object transaction
Observer::Transaction.commit
TransactionDispatcher.commit
Scheduler.worker(true)
assert_equal(10 + 2 + 25, Karma.score_by_user(agent1))
@ -327,7 +327,7 @@ class KarmaTest < ActiveSupport::TestCase
ticket1.tag_add('Tag2', agent1.id)
# execute object transaction
Observer::Transaction.commit
TransactionDispatcher.commit
Scheduler.worker(true)
assert_equal(10 + 2 + 25 + 4, Karma.score_by_user(agent1))
@ -338,7 +338,7 @@ class KarmaTest < ActiveSupport::TestCase
ticket1.tag_add('Tag4', agent2.id)
# execute object transaction
Observer::Transaction.commit
TransactionDispatcher.commit
Scheduler.worker(true)
assert_equal(10 + 2 + 25 + 4, Karma.score_by_user(agent1))
@ -375,7 +375,7 @@ class KarmaTest < ActiveSupport::TestCase
assert(ticket2)
# execute object transaction
Observer::Transaction.commit
TransactionDispatcher.commit
Scheduler.worker(true)
assert_equal(10 + 2 + 25 + 4 + 10, Karma.score_by_user(agent1))
@ -460,7 +460,7 @@ class KarmaTest < ActiveSupport::TestCase
ticket2.state = Ticket::State.lookup(name: 'open')
ticket2.save!
Observer::Transaction.commit
TransactionDispatcher.commit
Scheduler.worker(true)
#Scheduler.worker(true)

View file

@ -118,7 +118,7 @@ class OnlineNotificationTest < ActiveSupport::TestCase
tickets.push ticket1
# execute object transaction
Observer::Transaction.commit
TransactionDispatcher.commit
Scheduler.worker(true)
# because it's already closed
@ -136,7 +136,7 @@ class OnlineNotificationTest < ActiveSupport::TestCase
)
# execute object transaction
Observer::Transaction.commit
TransactionDispatcher.commit
Scheduler.worker(true)
# because it's already open
@ -173,7 +173,7 @@ class OnlineNotificationTest < ActiveSupport::TestCase
tickets.push ticket2
# execute object transaction
Observer::Transaction.commit
TransactionDispatcher.commit
Scheduler.worker(true)
# because it's already closed
@ -191,7 +191,7 @@ class OnlineNotificationTest < ActiveSupport::TestCase
)
# execute object transaction
Observer::Transaction.commit
TransactionDispatcher.commit
Scheduler.worker(true)
# because it's already open
@ -227,7 +227,7 @@ class OnlineNotificationTest < ActiveSupport::TestCase
tickets.push ticket3
# execute object transaction
Observer::Transaction.commit
TransactionDispatcher.commit
Scheduler.worker(true)
# because it's already new
@ -245,7 +245,7 @@ class OnlineNotificationTest < ActiveSupport::TestCase
)
# execute object transaction
Observer::Transaction.commit
TransactionDispatcher.commit
Scheduler.worker(true)
# because it's already closed
@ -269,7 +269,7 @@ class OnlineNotificationTest < ActiveSupport::TestCase
)
# execute object transaction
Observer::Transaction.commit
TransactionDispatcher.commit
Scheduler.worker(true)
# because it's already closed but an follow-up arrived later
@ -307,7 +307,7 @@ class OnlineNotificationTest < ActiveSupport::TestCase
tickets.push ticket4
# execute object transaction
Observer::Transaction.commit
TransactionDispatcher.commit
Scheduler.worker(true)
# because it's already new
@ -325,7 +325,7 @@ class OnlineNotificationTest < ActiveSupport::TestCase
)
# execute object transaction
Observer::Transaction.commit
TransactionDispatcher.commit
Scheduler.worker(true)
# because it's already open
@ -361,7 +361,7 @@ class OnlineNotificationTest < ActiveSupport::TestCase
tickets.push ticket5
# execute object transaction
Observer::Transaction.commit
TransactionDispatcher.commit
Scheduler.worker(true)
# because it's already new
@ -379,7 +379,7 @@ class OnlineNotificationTest < ActiveSupport::TestCase
)
# execute object transaction
Observer::Transaction.commit
TransactionDispatcher.commit
Scheduler.worker(true)
# because it's already open

View file

@ -169,7 +169,7 @@ class TicketNotificationTest < ActiveSupport::TestCase
assert(ticket1)
# execute object transaction
Observer::Transaction.commit
TransactionDispatcher.commit
Scheduler.worker(true)
# verify notifications to @agent1 + @agent2
@ -203,7 +203,7 @@ class TicketNotificationTest < ActiveSupport::TestCase
assert(ticket1)
# execute object transaction
Observer::Transaction.commit
TransactionDispatcher.commit
Scheduler.worker(true)
# verify notifications to @agent1 + @agent2
@ -240,7 +240,7 @@ class TicketNotificationTest < ActiveSupport::TestCase
assert(ticket1, 'ticket created - ticket notification simple')
# execute object transaction
Observer::Transaction.commit
TransactionDispatcher.commit
Scheduler.worker(true)
# verify notifications to @agent1 + @agent2
@ -253,7 +253,7 @@ class TicketNotificationTest < ActiveSupport::TestCase
ticket1.save!
# execute object transaction
Observer::Transaction.commit
TransactionDispatcher.commit
Scheduler.worker(true)
# verify notifications to @agent1 + @agent2
@ -274,7 +274,7 @@ class TicketNotificationTest < ActiveSupport::TestCase
)
# execute object transaction
Observer::Transaction.commit
TransactionDispatcher.commit
Scheduler.worker(true)
# verify notifications to not to @agent1 but to @agent2
@ -298,7 +298,7 @@ class TicketNotificationTest < ActiveSupport::TestCase
)
# execute object transaction
Observer::Transaction.commit
TransactionDispatcher.commit
Scheduler.worker(true)
# verify notifications to not to @agent1 but to @agent2
@ -331,7 +331,7 @@ class TicketNotificationTest < ActiveSupport::TestCase
)
# execute object transaction
Observer::Transaction.commit
TransactionDispatcher.commit
Scheduler.worker(true)
assert(ticket2, 'ticket created')
@ -346,7 +346,7 @@ class TicketNotificationTest < ActiveSupport::TestCase
ticket2.save!
# execute object transaction
Observer::Transaction.commit
TransactionDispatcher.commit
Scheduler.worker(true)
# verify notifications to none
@ -360,7 +360,7 @@ class TicketNotificationTest < ActiveSupport::TestCase
ticket2.save!
# execute object transaction
Observer::Transaction.commit
TransactionDispatcher.commit
Scheduler.worker(true)
# verify notifications to @agent1 and not to @agent2
@ -393,7 +393,7 @@ class TicketNotificationTest < ActiveSupport::TestCase
)
# execute object transaction
Observer::Transaction.commit
TransactionDispatcher.commit
Scheduler.worker(true)
assert(ticket3, 'ticket created')
@ -408,7 +408,7 @@ class TicketNotificationTest < ActiveSupport::TestCase
ticket3.save!
# execute object transaction
Observer::Transaction.commit
TransactionDispatcher.commit
Scheduler.worker(true)
# verify notifications to no one
@ -422,7 +422,7 @@ class TicketNotificationTest < ActiveSupport::TestCase
ticket3.save!
# execute object transaction
Observer::Transaction.commit
TransactionDispatcher.commit
Scheduler.worker(true)
# verify notifications to @agent1 and not to @agent2
@ -434,7 +434,7 @@ class TicketNotificationTest < ActiveSupport::TestCase
article_inbound.save!
# execute object transaction
Observer::Transaction.commit
TransactionDispatcher.commit
Scheduler.worker(true)
# verify notifications not to @agent1 and not to @agent2
@ -480,7 +480,7 @@ class TicketNotificationTest < ActiveSupport::TestCase
assert(ticket1, 'ticket created - ticket no notification')
# execute object transaction
Observer::Transaction.commit(disable_notification: true)
TransactionDispatcher.commit(disable_notification: true)
Scheduler.worker(true)
# verify notifications to @agent1 + @agent2
@ -533,7 +533,7 @@ class TicketNotificationTest < ActiveSupport::TestCase
)
# execute object transaction
Observer::Transaction.commit
TransactionDispatcher.commit
Scheduler.worker(true)
# verify notifications to @agent1 + @agent2
@ -546,7 +546,7 @@ class TicketNotificationTest < ActiveSupport::TestCase
ticket1.save!
# execute object transaction
Observer::Transaction.commit
TransactionDispatcher.commit
Scheduler.worker(true)
# verify notifications to @agent1 + @agent2
@ -579,7 +579,7 @@ class TicketNotificationTest < ActiveSupport::TestCase
)
# execute object transaction
Observer::Transaction.commit
TransactionDispatcher.commit
Scheduler.worker(true)
# verify notifications to @agent1 + @agent2
@ -592,7 +592,7 @@ class TicketNotificationTest < ActiveSupport::TestCase
ticket2.save!
# execute object transaction
Observer::Transaction.commit
TransactionDispatcher.commit
Scheduler.worker(true)
# verify notifications to @agent1 + @agent2
@ -625,7 +625,7 @@ class TicketNotificationTest < ActiveSupport::TestCase
)
# execute object transaction
Observer::Transaction.commit
TransactionDispatcher.commit
Scheduler.worker(true)
# verify notifications to @agent1 + @agent2
@ -638,7 +638,7 @@ class TicketNotificationTest < ActiveSupport::TestCase
ticket3.save!
# execute object transaction
Observer::Transaction.commit
TransactionDispatcher.commit
Scheduler.worker(true)
# verify notifications to @agent1 + @agent2
@ -691,7 +691,7 @@ class TicketNotificationTest < ActiveSupport::TestCase
)
# execute object transaction
Observer::Transaction.commit
TransactionDispatcher.commit
Scheduler.worker(true)
# verify notifications to @agent1 + @agent2
@ -704,7 +704,7 @@ class TicketNotificationTest < ActiveSupport::TestCase
ticket4.save!
# execute object transaction
Observer::Transaction.commit
TransactionDispatcher.commit
Scheduler.worker(true)
# verify notifications to @agent1 + @agent2
@ -757,7 +757,7 @@ class TicketNotificationTest < ActiveSupport::TestCase
)
# execute object transaction
Observer::Transaction.commit
TransactionDispatcher.commit
Scheduler.worker(true)
# verify notifications to @agent1 + @agent2
@ -770,7 +770,7 @@ class TicketNotificationTest < ActiveSupport::TestCase
ticket5.save!
# execute object transaction
Observer::Transaction.commit
TransactionDispatcher.commit
Scheduler.worker(true)
# verify notifications to @agent1 + @agent2
@ -824,7 +824,7 @@ class TicketNotificationTest < ActiveSupport::TestCase
)
# execute object transaction
Observer::Transaction.commit
TransactionDispatcher.commit
Scheduler.worker(true)
# verify notifications to @agent1 + @agent2
@ -839,7 +839,7 @@ class TicketNotificationTest < ActiveSupport::TestCase
ticket6.save!
# execute object transaction
Observer::Transaction.commit
TransactionDispatcher.commit
Scheduler.worker(true)
# verify notifications to @agent1 + @agent2
@ -903,7 +903,7 @@ class TicketNotificationTest < ActiveSupport::TestCase
)
# execute object transaction
Observer::Transaction.commit
TransactionDispatcher.commit
Scheduler.worker(true)
# verify notifications to @agent1 + @agent2
@ -918,7 +918,7 @@ class TicketNotificationTest < ActiveSupport::TestCase
ticket7.save!
# execute object transaction
Observer::Transaction.commit
TransactionDispatcher.commit
Scheduler.worker(true)
# verify notifications to @agent1 + @agent2
@ -957,7 +957,7 @@ class TicketNotificationTest < ActiveSupport::TestCase
assert(ticket1, 'ticket created')
# execute object transaction
Observer::Transaction.commit
TransactionDispatcher.commit
# update ticket attributes
ticket1.title = "#{ticket1.title} - #2"
@ -965,7 +965,7 @@ class TicketNotificationTest < ActiveSupport::TestCase
ticket1.save!
list = EventBuffer.list('transaction')
list_objects = Observer::Transaction.get_uniq_changes(list)
list_objects = TransactionDispatcher.get_uniq_changes(list)
assert_equal('some notification event test 1', list_objects['Ticket'][ticket1.id][:changes]['title'][0])
assert_equal('some notification event test 1 - #2', list_objects['Ticket'][ticket1.id][:changes]['title'][1])
@ -979,7 +979,7 @@ class TicketNotificationTest < ActiveSupport::TestCase
ticket1.save!
list = EventBuffer.list('transaction')
list_objects = Observer::Transaction.get_uniq_changes(list)
list_objects = TransactionDispatcher.get_uniq_changes(list)
assert_equal('some notification event test 1', list_objects['Ticket'][ticket1.id][:changes]['title'][0])
assert_equal('some notification event test 1 - #2 - #3', list_objects['Ticket'][ticket1.id][:changes]['title'][1])
@ -1018,7 +1018,7 @@ class TicketNotificationTest < ActiveSupport::TestCase
assert(ticket1, 'ticket created - ticket notification simple')
# execute object transaction
Observer::Transaction.commit
TransactionDispatcher.commit
Scheduler.worker(true)
# verify notifications to @agent1 + @agent2
@ -1061,7 +1061,7 @@ class TicketNotificationTest < ActiveSupport::TestCase
assert(ticket2, 'ticket created - ticket notification simple')
# execute object transaction
Observer::Transaction.commit
TransactionDispatcher.commit
Scheduler.worker(true)
# verify notifications to @agent1 + @agent2
@ -1076,7 +1076,7 @@ class TicketNotificationTest < ActiveSupport::TestCase
ticket2.save!
# execute object transaction
Observer::Transaction.commit
TransactionDispatcher.commit
Scheduler.worker(true)
# verify notifications to @agent1 + @agent2
@ -1098,7 +1098,7 @@ class TicketNotificationTest < ActiveSupport::TestCase
ticket2.save!
# execute object transaction
Observer::Transaction.commit
TransactionDispatcher.commit
Scheduler.worker(true)
# verify notifications to @agent1 + @agent2

View file

@ -548,7 +548,7 @@ Some Text'
# verfiy if agent2 got no notifcation
assert_equal(0, NotificationFactory::Mailer.already_sent?(ticket1, user2, 'email'), ticket1.id)
Observer::Transaction.commit
TransactionDispatcher.commit
Scheduler.worker(true)
ticket1.reload
@ -664,7 +664,7 @@ Some Text'
created_by_id: 1,
)
Observer::Transaction.commit
TransactionDispatcher.commit
Scheduler.worker(true)
ticket1.reload
@ -704,7 +704,7 @@ Some Text'
created_by_id: 1,
)
Observer::Transaction.commit
TransactionDispatcher.commit
Scheduler.worker(true)
ticket1.reload
@ -824,7 +824,7 @@ Some Text'
assert_equal(1, ticket1.articles.count, 'ticket1.articles verify')
assert_equal([], ticket1.tag_list)
Observer::Transaction.commit
TransactionDispatcher.commit
ticket1.reload
assert_equal('some <b>title</b> äöüß', ticket1.title, 'ticket1.title verify')

View file

@ -184,7 +184,7 @@ class TicketTriggerRecursiveDisabledTest < ActiveSupport::TestCase
assert_equal(1, ticket1.articles.count, 'ticket1.articles verify')
assert_equal([], ticket1.tag_list)
Observer::Transaction.commit
TransactionDispatcher.commit
ticket1.reload
assert_equal('some <b>title</b> äöüß', ticket1.title, 'ticket1.title verify')
@ -203,7 +203,7 @@ class TicketTriggerRecursiveDisabledTest < ActiveSupport::TestCase
ticket1.priority = Ticket::Priority.lookup(name: '2 normal')
ticket1.save!
Observer::Transaction.commit
TransactionDispatcher.commit
ticket1.reload
assert_equal('some <b>title</b> äöüß', ticket1.title, 'ticket1.title verify')
@ -216,7 +216,7 @@ class TicketTriggerRecursiveDisabledTest < ActiveSupport::TestCase
ticket1.state = Ticket::State.lookup(name: 'open')
ticket1.save!
Observer::Transaction.commit
TransactionDispatcher.commit
ticket1.reload
assert_equal('some <b>title</b> äöüß', ticket1.title, 'ticket1.title verify')
@ -229,7 +229,7 @@ class TicketTriggerRecursiveDisabledTest < ActiveSupport::TestCase
ticket1.state = Ticket::State.lookup(name: 'new')
ticket1.save!
Observer::Transaction.commit
TransactionDispatcher.commit
ticket1.reload
assert_equal('some <b>title</b> äöüß', ticket1.title, 'ticket1.title verify')
@ -256,7 +256,7 @@ class TicketTriggerRecursiveDisabledTest < ActiveSupport::TestCase
assert_equal(0, ticket2.articles.count, 'ticket2.articles verify')
assert_equal([], ticket2.tag_list)
Observer::Transaction.commit
TransactionDispatcher.commit
ticket2.reload
assert_equal('some title äöüß', ticket2.title, 'ticket2.title verify')
@ -297,7 +297,7 @@ class TicketTriggerRecursiveDisabledTest < ActiveSupport::TestCase
assert_equal(1, ticket3.articles.count, 'ticket3.articles verify')
assert_equal([], ticket3.tag_list)
Observer::Transaction.commit
TransactionDispatcher.commit
ticket3.reload
assert_equal('some <b>title</b> äöüß3', ticket3.title, 'ticket3.title verify')
@ -335,7 +335,7 @@ class TicketTriggerRecursiveDisabledTest < ActiveSupport::TestCase
created_by_id: 1,
)
Observer::Transaction.commit
TransactionDispatcher.commit
ticket3.reload
assert_equal('some <b>title</b> äöüß3', ticket3.title, 'ticket3.title verify')
@ -360,7 +360,7 @@ class TicketTriggerRecursiveDisabledTest < ActiveSupport::TestCase
created_by_id: 1,
)
Observer::Transaction.commit
TransactionDispatcher.commit
ticket3.reload
assert_equal('some <b>title</b> äöüß3', ticket3.title, 'ticket3.title verify')
@ -385,7 +385,7 @@ class TicketTriggerRecursiveDisabledTest < ActiveSupport::TestCase
created_by_id: 1,
)
Observer::Transaction.commit
TransactionDispatcher.commit
ticket3.reload
assert_equal('some <b>title</b> äöüß3', ticket3.title, 'ticket3.title verify')
@ -439,7 +439,7 @@ class TicketTriggerRecursiveDisabledTest < ActiveSupport::TestCase
assert_equal('2 normal', ticket1.priority.name, 'ticket1.priority verify')
assert_equal(0, ticket1.articles.count, 'ticket1.articles verify')
Observer::Transaction.commit
TransactionDispatcher.commit
ticket1.reload
assert_equal('some title äöüß', ticket1.title, 'ticket1.title verify')
@ -457,7 +457,7 @@ class TicketTriggerRecursiveDisabledTest < ActiveSupport::TestCase
ticket1.priority = Ticket::Priority.lookup(name: '2 normal')
ticket1.save!
Observer::Transaction.commit
TransactionDispatcher.commit
assert_equal('some title äöüß', ticket1.title, 'ticket1.title verify')
assert_equal('Users', ticket1.group.name, 'ticket1.group verify')
@ -468,7 +468,7 @@ class TicketTriggerRecursiveDisabledTest < ActiveSupport::TestCase
ticket1.state = Ticket::State.lookup(name: 'open')
ticket1.save!
Observer::Transaction.commit
TransactionDispatcher.commit
assert_equal('some title äöüß', ticket1.title, 'ticket1.title verify')
assert_equal('Users', ticket1.group.name, 'ticket1.group verify')
@ -479,7 +479,7 @@ class TicketTriggerRecursiveDisabledTest < ActiveSupport::TestCase
ticket1.state = Ticket::State.lookup(name: 'new')
ticket1.save!
Observer::Transaction.commit
TransactionDispatcher.commit
ticket1.reload
assert_equal('some title äöüß', ticket1.title, 'ticket1.title verify')
@ -532,7 +532,7 @@ class TicketTriggerRecursiveDisabledTest < ActiveSupport::TestCase
assert_equal('2 normal', ticket1.priority.name, 'ticket1.priority verify')
assert_equal(0, ticket1.articles.count, 'ticket1.articles verify')
Observer::Transaction.commit
TransactionDispatcher.commit
ticket1.reload
assert_equal('some title äöüß', ticket1.title, 'ticket1.title verify')
@ -544,7 +544,7 @@ class TicketTriggerRecursiveDisabledTest < ActiveSupport::TestCase
ticket1.priority = Ticket::Priority.lookup(name: '2 normal')
ticket1.save!
Observer::Transaction.commit
TransactionDispatcher.commit
assert_equal('some title äöüß', ticket1.title, 'ticket1.title verify')
assert_equal('Users', ticket1.group.name, 'ticket1.group verify')
@ -555,7 +555,7 @@ class TicketTriggerRecursiveDisabledTest < ActiveSupport::TestCase
ticket1.state = Ticket::State.lookup(name: 'open')
ticket1.save!
Observer::Transaction.commit
TransactionDispatcher.commit
assert_equal('some title äöüß', ticket1.title, 'ticket1.title verify')
assert_equal('Users', ticket1.group.name, 'ticket1.group verify')
@ -566,7 +566,7 @@ class TicketTriggerRecursiveDisabledTest < ActiveSupport::TestCase
ticket1.state = Ticket::State.lookup(name: 'new')
ticket1.save!
Observer::Transaction.commit
TransactionDispatcher.commit
ticket1.reload
assert_equal('some title äöüß', ticket1.title, 'ticket1.title verify')
@ -725,7 +725,7 @@ class TicketTriggerRecursiveDisabledTest < ActiveSupport::TestCase
ticket_p.priority = Ticket::Priority.lookup(name: '2 normal')
ticket_p.save!
Observer::Transaction.commit
TransactionDispatcher.commit
assert_equal('aaäöüßad asd', ticket_p.title, 'ticket_p.title verify')
assert_equal('Users', ticket_p.group.name, 'ticket_p.group verify')
assert_equal('new', ticket_p.state.name, 'ticket_p.state verify')
@ -745,7 +745,7 @@ class TicketTriggerRecursiveDisabledTest < ActiveSupport::TestCase
updated_by_id: 1,
created_by_id: 1,
)
Observer::Transaction.commit
TransactionDispatcher.commit
assert_equal('aaäöüßad asd', ticket_p.title, 'ticket_p.title verify')
assert_equal('Users', ticket_p.group.name, 'ticket_p.group verify')
assert_equal('new', ticket_p.state.name, 'ticket_p.state verify')
@ -765,7 +765,7 @@ class TicketTriggerRecursiveDisabledTest < ActiveSupport::TestCase
updated_by_id: 1,
created_by_id: 1,
)
Observer::Transaction.commit
TransactionDispatcher.commit
assert_equal('aaäöüßad asd', ticket_p.title, 'ticket_p.title verify')
assert_equal('Users', ticket_p.group.name, 'ticket_p.group verify')
assert_equal('new', ticket_p.state.name, 'ticket_p.state verify')
@ -785,7 +785,7 @@ class TicketTriggerRecursiveDisabledTest < ActiveSupport::TestCase
updated_by_id: 1,
created_by_id: 1,
)
Observer::Transaction.commit
TransactionDispatcher.commit
assert_equal('aaäöüßad asd', ticket_p.title, 'ticket_p.title verify')
assert_equal('Users', ticket_p.group.name, 'ticket_p.group verify')
assert_equal('new', ticket_p.state.name, 'ticket_p.state verify')
@ -816,7 +816,7 @@ class TicketTriggerRecursiveDisabledTest < ActiveSupport::TestCase
updated_by_id: 1,
created_by_id: 1,
)
Observer::Transaction.commit
TransactionDispatcher.commit
assert_equal('aaäöüßad asd', ticket_p.title, 'ticket_p.title verify')
assert_equal('Users', ticket_p.group.name, 'ticket_p.group verify')
assert_equal('open', ticket_p.state.name, 'ticket_p.state verify')
@ -934,11 +934,11 @@ class TicketTriggerRecursiveDisabledTest < ActiveSupport::TestCase
assert_equal('new', ticket_p.state.name)
assert_equal(1, ticket_p.articles.count)
Observer::Transaction.commit
TransactionDispatcher.commit
ticket_p.owner = agent1
ticket_p.save!
Observer::Transaction.commit
TransactionDispatcher.commit
assert_equal('aaäöüßad asd', ticket_p.title, 'ticket_p.title verify')
assert_equal('Users', ticket_p.group.name, 'ticket_p.group verify')
assert_equal('new', ticket_p.state.name, 'ticket_p.state verify')
@ -998,25 +998,25 @@ class TicketTriggerRecursiveDisabledTest < ActiveSupport::TestCase
assert_equal('new', ticket_p.state.name)
assert_equal(1, ticket_p.articles.count)
Observer::Transaction.commit
TransactionDispatcher.commit
assert_equal(1, ticket_p.articles.count)
ticket_p.priority = Ticket::Priority.lookup(name: '1 low')
ticket_p.save!
Observer::Transaction.commit
TransactionDispatcher.commit
assert_equal(1, ticket_p.articles.count)
ticket_p.priority = Ticket::Priority.lookup(name: '3 high')
ticket_p.save!
Observer::Transaction.commit
TransactionDispatcher.commit
assert_equal(1, ticket_p.articles.count)
ticket_p.owner = agent1
ticket_p.save!
Observer::Transaction.commit
TransactionDispatcher.commit
assert_equal('aaäöüßad asd', ticket_p.title, 'ticket_p.title verify')
assert_equal('Users', ticket_p.group.name, 'ticket_p.group verify')
@ -1082,25 +1082,25 @@ class TicketTriggerRecursiveDisabledTest < ActiveSupport::TestCase
assert_equal('new', ticket_p.state.name)
assert_equal(1, ticket_p.articles.count)
Observer::Transaction.commit
TransactionDispatcher.commit
assert_equal(1, ticket_p.articles.count)
ticket_p.priority = Ticket::Priority.lookup(name: '1 low')
ticket_p.save!
Observer::Transaction.commit
TransactionDispatcher.commit
assert_equal(1, ticket_p.articles.count)
ticket_p.priority = Ticket::Priority.lookup(name: '3 high')
ticket_p.save!
Observer::Transaction.commit
TransactionDispatcher.commit
assert_equal(1, ticket_p.articles.count)
ticket_p.owner = agent1
ticket_p.save!
Observer::Transaction.commit
TransactionDispatcher.commit
assert_equal('aaäöüßad asd', ticket_p.title, 'ticket_p.title verify')
assert_equal('Users', ticket_p.group.name, 'ticket_p.group verify')
assert_equal('new', ticket_p.state.name, 'ticket_p.state verify')
@ -1158,13 +1158,13 @@ class TicketTriggerRecursiveDisabledTest < ActiveSupport::TestCase
assert_equal(1, ticket_p.articles.count)
Observer::Transaction.commit
TransactionDispatcher.commit
assert_equal(1, ticket_p.articles.count)
ticket_p.owner = agent1
ticket_p.save!
Observer::Transaction.commit
TransactionDispatcher.commit
assert_equal(1, ticket_p.articles.count)
end
@ -1237,7 +1237,7 @@ class TicketTriggerRecursiveDisabledTest < ActiveSupport::TestCase
assert_equal(1, ticket1.articles.count, 'ticket1.articles verify')
assert_equal([], ticket1.tag_list)
Observer::Transaction.commit
TransactionDispatcher.commit
assert_equal(1, ticket1.articles.count)
@ -1255,7 +1255,7 @@ class TicketTriggerRecursiveDisabledTest < ActiveSupport::TestCase
updated_by_id: 1,
created_by_id: 1,
)
Observer::Transaction.commit
TransactionDispatcher.commit
assert_equal(3, ticket1.articles.count)
@ -1298,7 +1298,7 @@ class TicketTriggerRecursiveDisabledTest < ActiveSupport::TestCase
updated_by_id: 1,
created_by_id: 1,
)
Observer::Transaction.commit
TransactionDispatcher.commit
assert_equal(6, ticket1.articles.count)
end
@ -1366,7 +1366,7 @@ class TicketTriggerRecursiveDisabledTest < ActiveSupport::TestCase
updated_by_id: 1,
created_by_id: 1,
)
Observer::Transaction.commit
TransactionDispatcher.commit
assert_equal('test 123', ticket1.title, 'ticket1.title verify')
assert_equal('Users', ticket1.group.name, 'ticket1.group verify')
@ -1389,7 +1389,7 @@ class TicketTriggerRecursiveDisabledTest < ActiveSupport::TestCase
sender: Ticket::Article::Sender.find_by(name: 'Agent'),
type: Ticket::Article::Type.find_by(name: 'note'),
)
Observer::Transaction.commit
TransactionDispatcher.commit
UserInfo.current_user_id = nil
ticket1.reload
@ -1404,7 +1404,7 @@ class TicketTriggerRecursiveDisabledTest < ActiveSupport::TestCase
UserInfo.current_user_id = agent.id
ticket1.owner_id = 1
ticket1.save!
Observer::Transaction.commit
TransactionDispatcher.commit
UserInfo.current_user_id = nil
assert_equal('test 123', ticket1.title, 'ticket1.title verify')
@ -1492,7 +1492,7 @@ class TicketTriggerRecursiveDisabledTest < ActiveSupport::TestCase
updated_by_id: 1,
created_by_id: 1,
)
Observer::Transaction.commit
TransactionDispatcher.commit
assert_equal('test 123', ticket1.title, 'ticket1.title verify')
assert_equal('Users', ticket1.group.name, 'ticket1.group verify')
@ -1517,7 +1517,7 @@ class TicketTriggerRecursiveDisabledTest < ActiveSupport::TestCase
sender: Ticket::Article::Sender.find_by(name: 'Agent'),
type: Ticket::Article::Type.find_by(name: 'note'),
)
Observer::Transaction.commit
TransactionDispatcher.commit
UserInfo.current_user_id = nil
ticket1.reload
@ -1605,7 +1605,7 @@ class TicketTriggerRecursiveDisabledTest < ActiveSupport::TestCase
updated_by_id: 1,
created_by_id: 1,
)
Observer::Transaction.commit
TransactionDispatcher.commit
assert_equal('test 123', ticket1.title, 'ticket1.title verify')
assert_equal('Users', ticket1.group.name, 'ticket1.group verify')
@ -1630,7 +1630,7 @@ class TicketTriggerRecursiveDisabledTest < ActiveSupport::TestCase
sender: Ticket::Article::Sender.find_by(name: 'Agent'),
type: Ticket::Article::Type.find_by(name: 'note'),
)
Observer::Transaction.commit
TransactionDispatcher.commit
UserInfo.current_user_id = nil
ticket1.reload
@ -1722,7 +1722,7 @@ class TicketTriggerRecursiveDisabledTest < ActiveSupport::TestCase
updated_by_id: 1,
created_by_id: 1,
)
Observer::Transaction.commit
TransactionDispatcher.commit
assert_equal('test 123', ticket1.title, 'ticket1.title verify')
assert_equal('Users', ticket1.group.name, 'ticket1.group verify')
@ -1745,7 +1745,7 @@ class TicketTriggerRecursiveDisabledTest < ActiveSupport::TestCase
sender: Ticket::Article::Sender.find_by(name: 'Agent'),
type: Ticket::Article::Type.find_by(name: 'note'),
)
Observer::Transaction.commit
TransactionDispatcher.commit
UserInfo.current_user_id = nil
ticket1.reload
@ -1760,7 +1760,7 @@ class TicketTriggerRecursiveDisabledTest < ActiveSupport::TestCase
UserInfo.current_user_id = agent1.id
ticket1.owner_id = 1
ticket1.save!
Observer::Transaction.commit
TransactionDispatcher.commit
UserInfo.current_user_id = nil
assert_equal('test 123', ticket1.title, 'ticket1.title verify')
@ -1784,7 +1784,7 @@ class TicketTriggerRecursiveDisabledTest < ActiveSupport::TestCase
sender: Ticket::Article::Sender.find_by(name: 'Customer'),
type: Ticket::Article::Type.find_by(name: 'note'),
)
Observer::Transaction.commit
TransactionDispatcher.commit
UserInfo.current_user_id = nil
ticket1.reload
@ -1799,7 +1799,7 @@ class TicketTriggerRecursiveDisabledTest < ActiveSupport::TestCase
UserInfo.current_user_id = agent2.id
ticket1.owner_id = agent2.id
ticket1.save!
Observer::Transaction.commit
TransactionDispatcher.commit
UserInfo.current_user_id = nil
assert_equal('test 123', ticket1.title, 'ticket1.title verify')
@ -1823,7 +1823,7 @@ class TicketTriggerRecursiveDisabledTest < ActiveSupport::TestCase
sender: Ticket::Article::Sender.find_by(name: 'Agent'),
type: Ticket::Article::Type.find_by(name: 'note'),
)
Observer::Transaction.commit
TransactionDispatcher.commit
UserInfo.current_user_id = nil
ticket1.reload
@ -1905,7 +1905,7 @@ class TicketTriggerRecursiveDisabledTest < ActiveSupport::TestCase
updated_by_id: 1,
created_by_id: 1,
)
Observer::Transaction.commit
TransactionDispatcher.commit
assert_equal('test 123', ticket1.title, 'ticket1.title verify')
assert_equal('Users', ticket1.group.name, 'ticket1.group verify')
@ -1928,7 +1928,7 @@ class TicketTriggerRecursiveDisabledTest < ActiveSupport::TestCase
sender: Ticket::Article::Sender.find_by(name: 'Agent'),
type: Ticket::Article::Type.find_by(name: 'note'),
)
Observer::Transaction.commit
TransactionDispatcher.commit
UserInfo.current_user_id = nil
ticket1.reload
@ -1943,7 +1943,7 @@ class TicketTriggerRecursiveDisabledTest < ActiveSupport::TestCase
UserInfo.current_user_id = agent.id
ticket1.priority = Ticket::Priority.find_by(name: '1 low')
ticket1.save!
Observer::Transaction.commit
TransactionDispatcher.commit
UserInfo.current_user_id = nil
ticket1.reload
@ -1958,7 +1958,7 @@ class TicketTriggerRecursiveDisabledTest < ActiveSupport::TestCase
UserInfo.current_user_id = agent.id
ticket1.owner_id = 1
ticket1.save!
Observer::Transaction.commit
TransactionDispatcher.commit
UserInfo.current_user_id = nil
ticket1.reload
@ -1973,7 +1973,7 @@ class TicketTriggerRecursiveDisabledTest < ActiveSupport::TestCase
UserInfo.current_user_id = agent.id
ticket1.owner_id = agent.id
ticket1.save!
Observer::Transaction.commit
TransactionDispatcher.commit
UserInfo.current_user_id = nil
ticket1.reload
@ -2064,7 +2064,7 @@ class TicketTriggerRecursiveDisabledTest < ActiveSupport::TestCase
assert_equal(1, ticket1.articles.count, 'ticket1.articles verify')
assert_equal([], ticket1.tag_list)
Observer::Transaction.commit
TransactionDispatcher.commit
ticket1.reload
assert_equal('test 123', ticket1.title, 'ticket1.title verify')
@ -2110,7 +2110,7 @@ class TicketTriggerRecursiveDisabledTest < ActiveSupport::TestCase
assert_equal(1, ticket2.articles.count, 'ticket2.articles verify')
assert_equal([], ticket2.tag_list)
Observer::Transaction.commit
TransactionDispatcher.commit
ticket2.reload
assert_equal('test 123', ticket2.title, 'ticket2.title verify')
@ -2194,7 +2194,7 @@ class TicketTriggerRecursiveDisabledTest < ActiveSupport::TestCase
updated_by_id: 1,
created_by_id: 1,
)
Observer::Transaction.commit
TransactionDispatcher.commit
assert_equal('test 123', ticket1.title, 'ticket1.title verify')
assert_equal('Users', ticket1.group.name, 'ticket1.group verify')
@ -2207,7 +2207,7 @@ class TicketTriggerRecursiveDisabledTest < ActiveSupport::TestCase
UserInfo.current_user_id = agent1.id
ticket1.owner_id = agent1.id
ticket1.save!
Observer::Transaction.commit
TransactionDispatcher.commit
UserInfo.current_user_id = nil
ticket1.reload
@ -2222,7 +2222,7 @@ class TicketTriggerRecursiveDisabledTest < ActiveSupport::TestCase
UserInfo.current_user_id = agent1.id
ticket1.owner_id = agent1.id
ticket1.save!
Observer::Transaction.commit
TransactionDispatcher.commit
UserInfo.current_user_id = nil
ticket1.reload
@ -2237,7 +2237,7 @@ class TicketTriggerRecursiveDisabledTest < ActiveSupport::TestCase
UserInfo.current_user_id = agent1.id
ticket1.owner_id = agent2.id
ticket1.save!
Observer::Transaction.commit
TransactionDispatcher.commit
UserInfo.current_user_id = nil
ticket1.reload
@ -2332,7 +2332,7 @@ class TicketTriggerRecursiveDisabledTest < ActiveSupport::TestCase
created_by_id: 1,
)
Observer::Transaction.commit
TransactionDispatcher.commit
ticket1.reload
assert_equal('test 123', ticket1.title, 'ticket1.title verify')
@ -2357,7 +2357,7 @@ class TicketTriggerRecursiveDisabledTest < ActiveSupport::TestCase
updated_by_id: 1,
created_by_id: 1,
)
Observer::Transaction.commit
TransactionDispatcher.commit
ticket1.reload
assert_equal('test 123', ticket1.title, 'ticket1.title verify')
@ -2382,7 +2382,7 @@ class TicketTriggerRecursiveDisabledTest < ActiveSupport::TestCase
updated_by_id: 1,
created_by_id: 1,
)
Observer::Transaction.commit
TransactionDispatcher.commit
ticket1.reload
assert_equal('test 123', ticket1.title, 'ticket1.title verify')
@ -2409,7 +2409,7 @@ class TicketTriggerRecursiveDisabledTest < ActiveSupport::TestCase
updated_by_id: 1,
created_by_id: 1,
)
Observer::Transaction.commit
TransactionDispatcher.commit
ticket1.reload
assert_equal('test 123', ticket1.title, 'ticket1.title verify')
@ -2423,7 +2423,7 @@ class TicketTriggerRecursiveDisabledTest < ActiveSupport::TestCase
article.internal = false
article.save!
Observer::Transaction.commit
TransactionDispatcher.commit
ticket1.reload
assert_equal('test 123', ticket1.title, 'ticket1.title verify')
@ -2448,7 +2448,7 @@ class TicketTriggerRecursiveDisabledTest < ActiveSupport::TestCase
updated_by_id: 1,
created_by_id: 1,
)
Observer::Transaction.commit
TransactionDispatcher.commit
ticket1.reload
assert_equal('test 123', ticket1.title, 'ticket1.title verify')
@ -2617,7 +2617,7 @@ class TicketTriggerRecursiveDisabledTest < ActiveSupport::TestCase
created_by_id: 1,
)
Observer::Transaction.commit
TransactionDispatcher.commit
ticket1.reload
assert_equal('test 123', ticket1.title, 'ticket1.title verify')
@ -2632,7 +2632,7 @@ class TicketTriggerRecursiveDisabledTest < ActiveSupport::TestCase
UserInfo.current_user_id = agent.id
ticket1.owner_id = agent.id
ticket1.save!
Observer::Transaction.commit
TransactionDispatcher.commit
UserInfo.current_user_id = nil
ticket1.reload
@ -2659,7 +2659,7 @@ class TicketTriggerRecursiveDisabledTest < ActiveSupport::TestCase
created_by_id: 1,
)
Observer::Transaction.commit
TransactionDispatcher.commit
ticket1.reload
assert_equal('test 123', ticket1.title, 'ticket1.title verify')
@ -2674,7 +2674,7 @@ class TicketTriggerRecursiveDisabledTest < ActiveSupport::TestCase
UserInfo.current_user_id = agent.id
ticket1.owner_id = 1
ticket1.save!
Observer::Transaction.commit
TransactionDispatcher.commit
UserInfo.current_user_id = nil
ticket1.reload
@ -2761,7 +2761,7 @@ class TicketTriggerRecursiveDisabledTest < ActiveSupport::TestCase
created_by_id: 1,
)
Observer::Transaction.commit
TransactionDispatcher.commit
ticket1.reload
assert_equal('new', ticket1.state.name, 'ticket1.state new')
@ -2817,7 +2817,7 @@ class TicketTriggerRecursiveDisabledTest < ActiveSupport::TestCase
created_by_id: 1,
)
Observer::Transaction.commit
TransactionDispatcher.commit
ticket1.reload
assert_equal('new', ticket1.state.name, 'ticket1.state new')
@ -2886,7 +2886,7 @@ class TicketTriggerRecursiveDisabledTest < ActiveSupport::TestCase
created_by_id: 1,
)
Observer::Transaction.commit
TransactionDispatcher.commit
ticket1.reload
assert_equal('new', ticket1.state.name, 'ticket1.state new')
@ -2954,7 +2954,7 @@ class TicketTriggerRecursiveDisabledTest < ActiveSupport::TestCase
created_by_id: customer1.id,
)
Observer::Transaction.commit
TransactionDispatcher.commit
ticket1.reload
assert_equal('new', ticket1.state.name, 'ticket1.state new')
@ -3024,7 +3024,7 @@ class TicketTriggerRecursiveDisabledTest < ActiveSupport::TestCase
created_by_id: 1,
)
Observer::Transaction.commit
TransactionDispatcher.commit
ticket1.reload
assert_equal('new', ticket1.state.name, 'ticket1.state new')
@ -3082,7 +3082,7 @@ class TicketTriggerRecursiveDisabledTest < ActiveSupport::TestCase
created_by_id: 1,
)
Observer::Transaction.commit
TransactionDispatcher.commit
ticket1.reload
assert_equal('new', ticket1.state.name, 'ticket1.state new')
@ -3146,14 +3146,14 @@ class TicketTriggerRecursiveDisabledTest < ActiveSupport::TestCase
ticket1.reload
assert_equal(1, ticket1.articles.count)
Observer::Transaction.commit
TransactionDispatcher.commit
ticket1.reload
assert_equal(2, ticket1.articles.count)
ticket1.priority = Ticket::Priority.lookup(name: '2 normal')
ticket1.save!
Observer::Transaction.commit
TransactionDispatcher.commit
ticket1.reload
assert_equal(2, ticket1.articles.count)
@ -3172,7 +3172,7 @@ class TicketTriggerRecursiveDisabledTest < ActiveSupport::TestCase
created_by_id: 1,
)
Observer::Transaction.commit
TransactionDispatcher.commit
ticket1.reload
assert_equal(4, ticket1.articles.count)
assert_equal('some_loop_sender@example.com', ticket1.articles[2].from)
@ -3193,7 +3193,7 @@ class TicketTriggerRecursiveDisabledTest < ActiveSupport::TestCase
created_by_id: 1,
)
Observer::Transaction.commit
TransactionDispatcher.commit
ticket1.reload
assert_equal(6, ticket1.articles.count)
assert_equal('some_loop_sender@example.com', ticket1.articles[4].from)
@ -3214,7 +3214,7 @@ class TicketTriggerRecursiveDisabledTest < ActiveSupport::TestCase
created_by_id: 1,
)
Observer::Transaction.commit
TransactionDispatcher.commit
ticket1.reload
assert_equal(8, ticket1.articles.count)
assert_equal('some_loop_sender@example.com', ticket1.articles[6].from)
@ -3235,7 +3235,7 @@ class TicketTriggerRecursiveDisabledTest < ActiveSupport::TestCase
created_by_id: 1,
)
Observer::Transaction.commit
TransactionDispatcher.commit
ticket1.reload
assert_equal(10, ticket1.articles.count)
assert_equal('some_loop_sender@example.com', ticket1.articles[8].from)
@ -3256,7 +3256,7 @@ class TicketTriggerRecursiveDisabledTest < ActiveSupport::TestCase
created_by_id: 1,
)
Observer::Transaction.commit
TransactionDispatcher.commit
ticket1.reload
assert_equal(12, ticket1.articles.count)
assert_equal('some_loop_sender@example.com', ticket1.articles[10].from)
@ -3277,7 +3277,7 @@ class TicketTriggerRecursiveDisabledTest < ActiveSupport::TestCase
created_by_id: 1,
)
Observer::Transaction.commit
TransactionDispatcher.commit
ticket1.reload
assert_equal(14, ticket1.articles.count)
assert_equal('some_loop_sender@example.com', ticket1.articles[12].from)
@ -3298,7 +3298,7 @@ class TicketTriggerRecursiveDisabledTest < ActiveSupport::TestCase
created_by_id: 1,
)
Observer::Transaction.commit
TransactionDispatcher.commit
ticket1.reload
assert_equal(16, ticket1.articles.count)
assert_equal('some_loop_sender@example.com', ticket1.articles[14].from)
@ -3319,7 +3319,7 @@ class TicketTriggerRecursiveDisabledTest < ActiveSupport::TestCase
created_by_id: 1,
)
Observer::Transaction.commit
TransactionDispatcher.commit
ticket1.reload
assert_equal(18, ticket1.articles.count)
assert_equal('some_loop_sender@example.com', ticket1.articles[16].from)
@ -3340,7 +3340,7 @@ class TicketTriggerRecursiveDisabledTest < ActiveSupport::TestCase
created_by_id: 1,
)
Observer::Transaction.commit
TransactionDispatcher.commit
ticket1.reload
assert_equal(20, ticket1.articles.count)
assert_equal('some_loop_sender@example.com', ticket1.articles[18].from)
@ -3361,7 +3361,7 @@ class TicketTriggerRecursiveDisabledTest < ActiveSupport::TestCase
created_by_id: 1,
)
Observer::Transaction.commit
TransactionDispatcher.commit
ticket1.reload
assert_equal(21, ticket1.articles.count)
assert_equal('some_loop_sender@example.com', ticket1.articles[20].from)
@ -3381,7 +3381,7 @@ class TicketTriggerRecursiveDisabledTest < ActiveSupport::TestCase
created_by_id: 1,
)
Observer::Transaction.commit
TransactionDispatcher.commit
ticket1.reload
assert_equal(22, ticket1.articles.count)
assert_equal('some_loop_sender@example.com', ticket1.articles[21].from)
@ -3481,7 +3481,7 @@ class TicketTriggerRecursiveDisabledTest < ActiveSupport::TestCase
assert_equal(1, ticket1.articles.count, 'ticket1.articles verify')
assert_equal([], ticket1.tag_list)
Observer::Transaction.commit
TransactionDispatcher.commit
ticket1.reload
assert_equal('some <b>title</b> äöüß', ticket1.title, 'ticket1.title verify')
@ -3607,7 +3607,7 @@ class TicketTriggerRecursiveDisabledTest < ActiveSupport::TestCase
assert_equal('2 normal', ticket1.priority.name, 'ticket1.priority verify')
assert_equal(1, ticket1.articles.count, 'ticket1.articles verify')
assert_equal([], ticket1.tag_list)
Observer::Transaction.commit
TransactionDispatcher.commit
ticket1.reload
assert_equal('test 1', ticket1.title, 'ticket1.title verify')
assert_equal('Users', ticket1.group.name, 'ticket1.group verify')
@ -3645,7 +3645,7 @@ class TicketTriggerRecursiveDisabledTest < ActiveSupport::TestCase
assert_equal(1, ticket2.articles.count, 'ticket2.articles verify')
assert_equal([], ticket2.tag_list)
Observer::Transaction.commit
TransactionDispatcher.commit
ticket2.reload
assert_equal('test 2', ticket2.title, 'ticket2.title verify')
@ -3684,7 +3684,7 @@ class TicketTriggerRecursiveDisabledTest < ActiveSupport::TestCase
assert_equal('2 normal', ticket3.priority.name, 'ticket3.priority verify')
assert_equal(1, ticket3.articles.count, 'ticket3.articles verify')
assert_equal([], ticket3.tag_list)
Observer::Transaction.commit
TransactionDispatcher.commit
ticket3.reload
assert_equal('test 3', ticket3.title, 'ticket3.title verify')
assert_equal('Users', ticket3.group.name, 'ticket3.group verify')
@ -3759,7 +3759,7 @@ class TicketTriggerRecursiveDisabledTest < ActiveSupport::TestCase
assert_equal(1, ticket1.articles.count, 'ticket1.articles verify')
assert_equal([], ticket1.tag_list)
Observer::Transaction.commit
TransactionDispatcher.commit
ticket1.reload
assert_equal('test 1', ticket1.title, 'ticket1.title verify')
@ -3804,7 +3804,7 @@ class TicketTriggerRecursiveDisabledTest < ActiveSupport::TestCase
assert_equal(1, ticket2.articles.count, 'ticket2.articles verify')
assert_equal([], ticket2.tag_list)
Observer::Transaction.commit
TransactionDispatcher.commit
ticket2.reload
assert_equal('test 1', ticket2.title, 'ticket2.title verify')
@ -3875,7 +3875,7 @@ class TicketTriggerRecursiveDisabledTest < ActiveSupport::TestCase
assert_equal(1, ticket3.articles.count, 'ticket3.articles verify')
assert_equal([], ticket3.tag_list)
Observer::Transaction.commit
TransactionDispatcher.commit
ticket3.reload
assert_equal('test 1', ticket3.title, 'ticket3.title verify')
@ -3913,7 +3913,7 @@ class TicketTriggerRecursiveDisabledTest < ActiveSupport::TestCase
assert_equal(1, ticket4.articles.count, 'ticket4.articles verify')
assert_equal([], ticket4.tag_list)
Observer::Transaction.commit
TransactionDispatcher.commit
ticket4.reload
assert_equal('test 1', ticket4.title, 'ticket4.title verify')
@ -4063,7 +4063,7 @@ class TicketTriggerRecursiveDisabledTest < ActiveSupport::TestCase
ticket1.owner_id = agent1.id
ticket1.save!
Observer::Transaction.commit
TransactionDispatcher.commit
# this will add a tag by trigger
ticket1.reload
@ -4082,7 +4082,7 @@ class TicketTriggerRecursiveDisabledTest < ActiveSupport::TestCase
ticket1.owner_id = agent2.id
ticket1.save!
Observer::Transaction.commit
TransactionDispatcher.commit
ticket1.reload
assert_equal('some title äöüß', ticket1.title, 'ticket1.title verify')
@ -4100,7 +4100,7 @@ class TicketTriggerRecursiveDisabledTest < ActiveSupport::TestCase
ticket1.owner_id = agent1.id
ticket1.save!
Observer::Transaction.commit
TransactionDispatcher.commit
ticket1.reload
assert_equal('some title äöüß', ticket1.title, 'ticket1.title verify')
@ -4118,7 +4118,7 @@ class TicketTriggerRecursiveDisabledTest < ActiveSupport::TestCase
ticket2.owner_id = agent1.id
ticket2.save!
Observer::Transaction.commit
TransactionDispatcher.commit
ticket2.reload
assert_equal('some title äöüß', ticket2.title, 'ticket2.title verify')
@ -4188,7 +4188,7 @@ class TicketTriggerRecursiveDisabledTest < ActiveSupport::TestCase
assert_equal('Sabine Schütz <some_sender@example.com>', ticket1.articles.first.from, 'ticket1.articles.first.from verify')
assert_equal([], ticket1.tag_list)
Observer::Transaction.commit
TransactionDispatcher.commit
ticket1.reload
assert_equal('test 1', ticket1.title, 'ticket1.title verify')

View file

@ -184,7 +184,7 @@ class TicketTriggerTest < ActiveSupport::TestCase
assert_equal(1, ticket1.articles.count, 'ticket1.articles verify')
assert_equal([], ticket1.tag_list)
Observer::Transaction.commit
TransactionDispatcher.commit
ticket1.reload
assert_equal('some <b>title</b> äöüß', ticket1.title, 'ticket1.title verify')
@ -211,7 +211,7 @@ class TicketTriggerTest < ActiveSupport::TestCase
ticket1.priority = Ticket::Priority.lookup(name: '2 normal')
ticket1.save!
Observer::Transaction.commit
TransactionDispatcher.commit
ticket1.reload
assert_equal('some <b>title</b> äöüß', ticket1.title, 'ticket1.title verify')
@ -224,7 +224,7 @@ class TicketTriggerTest < ActiveSupport::TestCase
ticket1.state = Ticket::State.lookup(name: 'open')
ticket1.save!
Observer::Transaction.commit
TransactionDispatcher.commit
ticket1.reload
assert_equal('some <b>title</b> äöüß', ticket1.title, 'ticket1.title verify')
@ -237,7 +237,7 @@ class TicketTriggerTest < ActiveSupport::TestCase
ticket1.state = Ticket::State.lookup(name: 'new')
ticket1.save!
Observer::Transaction.commit
TransactionDispatcher.commit
ticket1.reload
assert_equal('some <b>title</b> äöüß', ticket1.title, 'ticket1.title verify')
@ -264,7 +264,7 @@ class TicketTriggerTest < ActiveSupport::TestCase
assert_equal(0, ticket2.articles.count, 'ticket2.articles verify')
assert_equal([], ticket2.tag_list)
Observer::Transaction.commit
TransactionDispatcher.commit
ticket2.reload
assert_equal('some title äöüß', ticket2.title, 'ticket2.title verify')
@ -305,7 +305,7 @@ class TicketTriggerTest < ActiveSupport::TestCase
assert_equal(1, ticket3.articles.count, 'ticket3.articles verify')
assert_equal([], ticket3.tag_list)
Observer::Transaction.commit
TransactionDispatcher.commit
ticket3.reload
assert_equal('some <b>title</b> äöüß3', ticket3.title, 'ticket3.title verify')
@ -349,7 +349,7 @@ class TicketTriggerTest < ActiveSupport::TestCase
created_by_id: 1,
)
Observer::Transaction.commit
TransactionDispatcher.commit
ticket3.reload
assert_equal('some <b>title</b> äöüß3', ticket3.title, 'ticket3.title verify')
@ -374,7 +374,7 @@ class TicketTriggerTest < ActiveSupport::TestCase
created_by_id: 1,
)
Observer::Transaction.commit
TransactionDispatcher.commit
ticket3.reload
assert_equal('some <b>title</b> äöüß3', ticket3.title, 'ticket3.title verify')
@ -399,7 +399,7 @@ class TicketTriggerTest < ActiveSupport::TestCase
created_by_id: 1,
)
Observer::Transaction.commit
TransactionDispatcher.commit
ticket3.reload
assert_equal('some <b>title</b> äöüß3', ticket3.title, 'ticket3.title verify')
@ -453,7 +453,7 @@ class TicketTriggerTest < ActiveSupport::TestCase
assert_equal('2 normal', ticket1.priority.name, 'ticket1.priority verify')
assert_equal(0, ticket1.articles.count, 'ticket1.articles verify')
Observer::Transaction.commit
TransactionDispatcher.commit
ticket1.reload
assert_equal('some title äöüß', ticket1.title, 'ticket1.title verify')
@ -471,7 +471,7 @@ class TicketTriggerTest < ActiveSupport::TestCase
ticket1.priority = Ticket::Priority.lookup(name: '2 normal')
ticket1.save!
Observer::Transaction.commit
TransactionDispatcher.commit
assert_equal('some title äöüß', ticket1.title, 'ticket1.title verify')
assert_equal('Users', ticket1.group.name, 'ticket1.group verify')
@ -482,7 +482,7 @@ class TicketTriggerTest < ActiveSupport::TestCase
ticket1.state = Ticket::State.lookup(name: 'open')
ticket1.save!
Observer::Transaction.commit
TransactionDispatcher.commit
assert_equal('some title äöüß', ticket1.title, 'ticket1.title verify')
assert_equal('Users', ticket1.group.name, 'ticket1.group verify')
@ -493,7 +493,7 @@ class TicketTriggerTest < ActiveSupport::TestCase
ticket1.state = Ticket::State.lookup(name: 'new')
ticket1.save!
Observer::Transaction.commit
TransactionDispatcher.commit
ticket1.reload
assert_equal('some title äöüß', ticket1.title, 'ticket1.title verify')
@ -546,7 +546,7 @@ class TicketTriggerTest < ActiveSupport::TestCase
assert_equal('2 normal', ticket1.priority.name, 'ticket1.priority verify')
assert_equal(0, ticket1.articles.count, 'ticket1.articles verify')
Observer::Transaction.commit
TransactionDispatcher.commit
ticket1.reload
assert_equal('some title äöüß', ticket1.title, 'ticket1.title verify')
@ -558,7 +558,7 @@ class TicketTriggerTest < ActiveSupport::TestCase
ticket1.priority = Ticket::Priority.lookup(name: '2 normal')
ticket1.save!
Observer::Transaction.commit
TransactionDispatcher.commit
assert_equal('some title äöüß', ticket1.title, 'ticket1.title verify')
assert_equal('Users', ticket1.group.name, 'ticket1.group verify')
@ -569,7 +569,7 @@ class TicketTriggerTest < ActiveSupport::TestCase
ticket1.state = Ticket::State.lookup(name: 'open')
ticket1.save!
Observer::Transaction.commit
TransactionDispatcher.commit
assert_equal('some title äöüß', ticket1.title, 'ticket1.title verify')
assert_equal('Users', ticket1.group.name, 'ticket1.group verify')
@ -580,7 +580,7 @@ class TicketTriggerTest < ActiveSupport::TestCase
ticket1.state = Ticket::State.lookup(name: 'new')
ticket1.save!
Observer::Transaction.commit
TransactionDispatcher.commit
ticket1.reload
assert_equal('some title äöüß', ticket1.title, 'ticket1.title verify')
@ -739,7 +739,7 @@ class TicketTriggerTest < ActiveSupport::TestCase
ticket_p.priority = Ticket::Priority.lookup(name: '2 normal')
ticket_p.save!
Observer::Transaction.commit
TransactionDispatcher.commit
assert_equal('aaäöüßad asd', ticket_p.title, 'ticket_p.title verify')
assert_equal('Users', ticket_p.group.name, 'ticket_p.group verify')
assert_equal('new', ticket_p.state.name, 'ticket_p.state verify')
@ -759,7 +759,7 @@ class TicketTriggerTest < ActiveSupport::TestCase
updated_by_id: 1,
created_by_id: 1,
)
Observer::Transaction.commit
TransactionDispatcher.commit
assert_equal('aaäöüßad asd', ticket_p.title, 'ticket_p.title verify')
assert_equal('Users', ticket_p.group.name, 'ticket_p.group verify')
assert_equal('new', ticket_p.state.name, 'ticket_p.state verify')
@ -779,7 +779,7 @@ class TicketTriggerTest < ActiveSupport::TestCase
updated_by_id: 1,
created_by_id: 1,
)
Observer::Transaction.commit
TransactionDispatcher.commit
assert_equal('aaäöüßad asd', ticket_p.title, 'ticket_p.title verify')
assert_equal('Users', ticket_p.group.name, 'ticket_p.group verify')
assert_equal('new', ticket_p.state.name, 'ticket_p.state verify')
@ -799,7 +799,7 @@ class TicketTriggerTest < ActiveSupport::TestCase
updated_by_id: 1,
created_by_id: 1,
)
Observer::Transaction.commit
TransactionDispatcher.commit
assert_equal('aaäöüßad asd', ticket_p.title, 'ticket_p.title verify')
assert_equal('Users', ticket_p.group.name, 'ticket_p.group verify')
assert_equal('new', ticket_p.state.name, 'ticket_p.state verify')
@ -830,7 +830,7 @@ class TicketTriggerTest < ActiveSupport::TestCase
updated_by_id: 1,
created_by_id: 1,
)
Observer::Transaction.commit
TransactionDispatcher.commit
assert_equal('aaäöüßad asd', ticket_p.title, 'ticket_p.title verify')
assert_equal('Users', ticket_p.group.name, 'ticket_p.group verify')
assert_equal('open', ticket_p.state.name, 'ticket_p.state verify')
@ -960,11 +960,11 @@ class TicketTriggerTest < ActiveSupport::TestCase
assert_equal(1, ticket_p.articles.count)
ticket_p.articles.last
Observer::Transaction.commit
TransactionDispatcher.commit
ticket_p.owner = agent1
ticket_p.save!
Observer::Transaction.commit
TransactionDispatcher.commit
assert_equal('aaäöüßad asd', ticket_p.title, 'ticket_p.title verify')
assert_equal('Users', ticket_p.group.name, 'ticket_p.group verify')
assert_equal('new', ticket_p.state.name, 'ticket_p.state verify')
@ -1024,25 +1024,25 @@ class TicketTriggerTest < ActiveSupport::TestCase
assert_equal('new', ticket_p.state.name)
assert_equal(1, ticket_p.articles.count)
Observer::Transaction.commit
TransactionDispatcher.commit
assert_equal(1, ticket_p.articles.count)
ticket_p.priority = Ticket::Priority.lookup(name: '1 low')
ticket_p.save!
Observer::Transaction.commit
TransactionDispatcher.commit
assert_equal(1, ticket_p.articles.count)
ticket_p.priority = Ticket::Priority.lookup(name: '3 high')
ticket_p.save!
Observer::Transaction.commit
TransactionDispatcher.commit
assert_equal(1, ticket_p.articles.count)
ticket_p.owner = agent1
ticket_p.save!
Observer::Transaction.commit
TransactionDispatcher.commit
assert_equal('aaäöüßad asd', ticket_p.title, 'ticket_p.title verify')
assert_equal('Users', ticket_p.group.name, 'ticket_p.group verify')
@ -1108,25 +1108,25 @@ class TicketTriggerTest < ActiveSupport::TestCase
assert_equal('new', ticket_p.state.name)
assert_equal(1, ticket_p.articles.count)
Observer::Transaction.commit
TransactionDispatcher.commit
assert_equal(1, ticket_p.articles.count)
ticket_p.priority = Ticket::Priority.lookup(name: '1 low')
ticket_p.save!
Observer::Transaction.commit
TransactionDispatcher.commit
assert_equal(1, ticket_p.articles.count)
ticket_p.priority = Ticket::Priority.lookup(name: '3 high')
ticket_p.save!
Observer::Transaction.commit
TransactionDispatcher.commit
assert_equal(1, ticket_p.articles.count)
ticket_p.owner = agent1
ticket_p.save!
Observer::Transaction.commit
TransactionDispatcher.commit
assert_equal('aaäöüßad asd', ticket_p.title, 'ticket_p.title verify')
assert_equal('Users', ticket_p.group.name, 'ticket_p.group verify')
assert_equal('new', ticket_p.state.name, 'ticket_p.state verify')
@ -1184,13 +1184,13 @@ class TicketTriggerTest < ActiveSupport::TestCase
assert_equal(1, ticket_p.articles.count)
Observer::Transaction.commit
TransactionDispatcher.commit
assert_equal(1, ticket_p.articles.count)
ticket_p.owner = agent1
ticket_p.save!
Observer::Transaction.commit
TransactionDispatcher.commit
assert_equal(1, ticket_p.articles.count)
end
@ -1263,7 +1263,7 @@ class TicketTriggerTest < ActiveSupport::TestCase
assert_equal(1, ticket1.articles.count, 'ticket1.articles verify')
assert_equal([], ticket1.tag_list)
Observer::Transaction.commit
TransactionDispatcher.commit
assert_equal(1, ticket1.articles.count)
@ -1281,7 +1281,7 @@ class TicketTriggerTest < ActiveSupport::TestCase
updated_by_id: 1,
created_by_id: 1,
)
Observer::Transaction.commit
TransactionDispatcher.commit
assert_equal(3, ticket1.articles.count)
@ -1324,7 +1324,7 @@ class TicketTriggerTest < ActiveSupport::TestCase
updated_by_id: 1,
created_by_id: 1,
)
Observer::Transaction.commit
TransactionDispatcher.commit
assert_equal(6, ticket1.articles.count)
end
@ -1392,7 +1392,7 @@ class TicketTriggerTest < ActiveSupport::TestCase
updated_by_id: 1,
created_by_id: 1,
)
Observer::Transaction.commit
TransactionDispatcher.commit
assert_equal('test 123', ticket1.title, 'ticket1.title verify')
assert_equal('Users', ticket1.group.name, 'ticket1.group verify')
@ -1415,7 +1415,7 @@ class TicketTriggerTest < ActiveSupport::TestCase
sender: Ticket::Article::Sender.find_by(name: 'Agent'),
type: Ticket::Article::Type.find_by(name: 'note'),
)
Observer::Transaction.commit
TransactionDispatcher.commit
UserInfo.current_user_id = nil
ticket1.reload
@ -1430,7 +1430,7 @@ class TicketTriggerTest < ActiveSupport::TestCase
UserInfo.current_user_id = agent.id
ticket1.owner_id = 1
ticket1.save!
Observer::Transaction.commit
TransactionDispatcher.commit
UserInfo.current_user_id = nil
assert_equal('test 123', ticket1.title, 'ticket1.title verify')
@ -1518,7 +1518,7 @@ class TicketTriggerTest < ActiveSupport::TestCase
updated_by_id: 1,
created_by_id: 1,
)
Observer::Transaction.commit
TransactionDispatcher.commit
assert_equal('test 123', ticket1.title, 'ticket1.title verify')
assert_equal('Users', ticket1.group.name, 'ticket1.group verify')
@ -1543,7 +1543,7 @@ class TicketTriggerTest < ActiveSupport::TestCase
sender: Ticket::Article::Sender.find_by(name: 'Agent'),
type: Ticket::Article::Type.find_by(name: 'note'),
)
Observer::Transaction.commit
TransactionDispatcher.commit
UserInfo.current_user_id = nil
ticket1.reload
@ -1631,7 +1631,7 @@ class TicketTriggerTest < ActiveSupport::TestCase
updated_by_id: 1,
created_by_id: 1,
)
Observer::Transaction.commit
TransactionDispatcher.commit
assert_equal('test 123', ticket1.title, 'ticket1.title verify')
assert_equal('Users', ticket1.group.name, 'ticket1.group verify')
@ -1656,7 +1656,7 @@ class TicketTriggerTest < ActiveSupport::TestCase
sender: Ticket::Article::Sender.find_by(name: 'Agent'),
type: Ticket::Article::Type.find_by(name: 'note'),
)
Observer::Transaction.commit
TransactionDispatcher.commit
UserInfo.current_user_id = nil
ticket1.reload
@ -1748,7 +1748,7 @@ class TicketTriggerTest < ActiveSupport::TestCase
updated_by_id: 1,
created_by_id: 1,
)
Observer::Transaction.commit
TransactionDispatcher.commit
assert_equal('test 123', ticket1.title, 'ticket1.title verify')
assert_equal('Users', ticket1.group.name, 'ticket1.group verify')
@ -1771,7 +1771,7 @@ class TicketTriggerTest < ActiveSupport::TestCase
sender: Ticket::Article::Sender.find_by(name: 'Agent'),
type: Ticket::Article::Type.find_by(name: 'note'),
)
Observer::Transaction.commit
TransactionDispatcher.commit
UserInfo.current_user_id = nil
ticket1.reload
@ -1786,7 +1786,7 @@ class TicketTriggerTest < ActiveSupport::TestCase
UserInfo.current_user_id = agent1.id
ticket1.owner_id = 1
ticket1.save!
Observer::Transaction.commit
TransactionDispatcher.commit
UserInfo.current_user_id = nil
assert_equal('test 123', ticket1.title, 'ticket1.title verify')
@ -1810,7 +1810,7 @@ class TicketTriggerTest < ActiveSupport::TestCase
sender: Ticket::Article::Sender.find_by(name: 'Customer'),
type: Ticket::Article::Type.find_by(name: 'note'),
)
Observer::Transaction.commit
TransactionDispatcher.commit
UserInfo.current_user_id = nil
ticket1.reload
@ -1825,7 +1825,7 @@ class TicketTriggerTest < ActiveSupport::TestCase
UserInfo.current_user_id = agent2.id
ticket1.owner_id = agent2.id
ticket1.save!
Observer::Transaction.commit
TransactionDispatcher.commit
UserInfo.current_user_id = nil
assert_equal('test 123', ticket1.title, 'ticket1.title verify')
@ -1849,7 +1849,7 @@ class TicketTriggerTest < ActiveSupport::TestCase
sender: Ticket::Article::Sender.find_by(name: 'Agent'),
type: Ticket::Article::Type.find_by(name: 'note'),
)
Observer::Transaction.commit
TransactionDispatcher.commit
UserInfo.current_user_id = nil
ticket1.reload
@ -1931,7 +1931,7 @@ class TicketTriggerTest < ActiveSupport::TestCase
updated_by_id: 1,
created_by_id: 1,
)
Observer::Transaction.commit
TransactionDispatcher.commit
assert_equal('test 123', ticket1.title, 'ticket1.title verify')
assert_equal('Users', ticket1.group.name, 'ticket1.group verify')
@ -1954,7 +1954,7 @@ class TicketTriggerTest < ActiveSupport::TestCase
sender: Ticket::Article::Sender.find_by(name: 'Agent'),
type: Ticket::Article::Type.find_by(name: 'note'),
)
Observer::Transaction.commit
TransactionDispatcher.commit
UserInfo.current_user_id = nil
ticket1.reload
@ -1969,7 +1969,7 @@ class TicketTriggerTest < ActiveSupport::TestCase
UserInfo.current_user_id = agent.id
ticket1.priority = Ticket::Priority.find_by(name: '1 low')
ticket1.save!
Observer::Transaction.commit
TransactionDispatcher.commit
UserInfo.current_user_id = nil
ticket1.reload
@ -1984,7 +1984,7 @@ class TicketTriggerTest < ActiveSupport::TestCase
UserInfo.current_user_id = agent.id
ticket1.owner_id = 1
ticket1.save!
Observer::Transaction.commit
TransactionDispatcher.commit
UserInfo.current_user_id = nil
ticket1.reload
@ -1999,7 +1999,7 @@ class TicketTriggerTest < ActiveSupport::TestCase
UserInfo.current_user_id = agent.id
ticket1.owner_id = agent.id
ticket1.save!
Observer::Transaction.commit
TransactionDispatcher.commit
UserInfo.current_user_id = nil
ticket1.reload
@ -2090,7 +2090,7 @@ class TicketTriggerTest < ActiveSupport::TestCase
assert_equal(1, ticket1.articles.count, 'ticket1.articles verify')
assert_equal([], ticket1.tag_list)
Observer::Transaction.commit
TransactionDispatcher.commit
ticket1.reload
assert_equal('test 123', ticket1.title, 'ticket1.title verify')
@ -2136,7 +2136,7 @@ class TicketTriggerTest < ActiveSupport::TestCase
assert_equal(1, ticket2.articles.count, 'ticket2.articles verify')
assert_equal([], ticket2.tag_list)
Observer::Transaction.commit
TransactionDispatcher.commit
ticket2.reload
assert_equal('test 123', ticket2.title, 'ticket2.title verify')
@ -2220,7 +2220,7 @@ class TicketTriggerTest < ActiveSupport::TestCase
updated_by_id: 1,
created_by_id: 1,
)
Observer::Transaction.commit
TransactionDispatcher.commit
assert_equal('test 123', ticket1.title, 'ticket1.title verify')
assert_equal('Users', ticket1.group.name, 'ticket1.group verify')
@ -2233,7 +2233,7 @@ class TicketTriggerTest < ActiveSupport::TestCase
UserInfo.current_user_id = agent1.id
ticket1.owner_id = agent1.id
ticket1.save!
Observer::Transaction.commit
TransactionDispatcher.commit
UserInfo.current_user_id = nil
ticket1.reload
@ -2248,7 +2248,7 @@ class TicketTriggerTest < ActiveSupport::TestCase
UserInfo.current_user_id = agent1.id
ticket1.owner_id = agent1.id
ticket1.save!
Observer::Transaction.commit
TransactionDispatcher.commit
UserInfo.current_user_id = nil
ticket1.reload
@ -2263,7 +2263,7 @@ class TicketTriggerTest < ActiveSupport::TestCase
UserInfo.current_user_id = agent1.id
ticket1.owner_id = agent2.id
ticket1.save!
Observer::Transaction.commit
TransactionDispatcher.commit
UserInfo.current_user_id = nil
ticket1.reload
@ -2358,7 +2358,7 @@ class TicketTriggerTest < ActiveSupport::TestCase
created_by_id: 1,
)
Observer::Transaction.commit
TransactionDispatcher.commit
ticket1.reload
assert_equal('test 123', ticket1.title, 'ticket1.title verify')
@ -2383,7 +2383,7 @@ class TicketTriggerTest < ActiveSupport::TestCase
updated_by_id: 1,
created_by_id: 1,
)
Observer::Transaction.commit
TransactionDispatcher.commit
ticket1.reload
assert_equal('test 123', ticket1.title, 'ticket1.title verify')
@ -2408,7 +2408,7 @@ class TicketTriggerTest < ActiveSupport::TestCase
updated_by_id: 1,
created_by_id: 1,
)
Observer::Transaction.commit
TransactionDispatcher.commit
ticket1.reload
assert_equal('test 123', ticket1.title, 'ticket1.title verify')
@ -2435,7 +2435,7 @@ class TicketTriggerTest < ActiveSupport::TestCase
updated_by_id: 1,
created_by_id: 1,
)
Observer::Transaction.commit
TransactionDispatcher.commit
ticket1.reload
assert_equal('test 123', ticket1.title, 'ticket1.title verify')
@ -2449,7 +2449,7 @@ class TicketTriggerTest < ActiveSupport::TestCase
article.internal = false
article.save!
Observer::Transaction.commit
TransactionDispatcher.commit
ticket1.reload
assert_equal('test 123', ticket1.title, 'ticket1.title verify')
@ -2474,7 +2474,7 @@ class TicketTriggerTest < ActiveSupport::TestCase
updated_by_id: 1,
created_by_id: 1,
)
Observer::Transaction.commit
TransactionDispatcher.commit
ticket1.reload
assert_equal('test 123', ticket1.title, 'ticket1.title verify')
@ -2643,7 +2643,7 @@ class TicketTriggerTest < ActiveSupport::TestCase
created_by_id: 1,
)
Observer::Transaction.commit
TransactionDispatcher.commit
ticket1.reload
assert_equal('test 123', ticket1.title, 'ticket1.title verify')
@ -2658,7 +2658,7 @@ class TicketTriggerTest < ActiveSupport::TestCase
UserInfo.current_user_id = agent.id
ticket1.owner_id = agent.id
ticket1.save!
Observer::Transaction.commit
TransactionDispatcher.commit
UserInfo.current_user_id = nil
ticket1.reload
@ -2685,7 +2685,7 @@ class TicketTriggerTest < ActiveSupport::TestCase
created_by_id: 1,
)
Observer::Transaction.commit
TransactionDispatcher.commit
ticket1.reload
assert_equal('test 123', ticket1.title, 'ticket1.title verify')
@ -2700,7 +2700,7 @@ class TicketTriggerTest < ActiveSupport::TestCase
UserInfo.current_user_id = agent.id
ticket1.owner_id = 1
ticket1.save!
Observer::Transaction.commit
TransactionDispatcher.commit
UserInfo.current_user_id = nil
ticket1.reload
@ -2787,7 +2787,7 @@ class TicketTriggerTest < ActiveSupport::TestCase
created_by_id: 1,
)
Observer::Transaction.commit
TransactionDispatcher.commit
ticket1.reload
assert_equal('new', ticket1.state.name, 'ticket1.state new')
@ -2843,7 +2843,7 @@ class TicketTriggerTest < ActiveSupport::TestCase
created_by_id: 1,
)
Observer::Transaction.commit
TransactionDispatcher.commit
ticket1.reload
assert_equal('new', ticket1.state.name, 'ticket1.state new')
@ -2912,7 +2912,7 @@ class TicketTriggerTest < ActiveSupport::TestCase
created_by_id: 1,
)
Observer::Transaction.commit
TransactionDispatcher.commit
ticket1.reload
assert_equal('new', ticket1.state.name, 'ticket1.state new')
@ -2980,7 +2980,7 @@ class TicketTriggerTest < ActiveSupport::TestCase
created_by_id: customer1.id,
)
Observer::Transaction.commit
TransactionDispatcher.commit
ticket1.reload
assert_equal('new', ticket1.state.name, 'ticket1.state new')
@ -3050,7 +3050,7 @@ class TicketTriggerTest < ActiveSupport::TestCase
created_by_id: 1,
)
Observer::Transaction.commit
TransactionDispatcher.commit
ticket1.reload
assert_equal('new', ticket1.state.name, 'ticket1.state new')
@ -3108,7 +3108,7 @@ class TicketTriggerTest < ActiveSupport::TestCase
created_by_id: 1,
)
Observer::Transaction.commit
TransactionDispatcher.commit
ticket1.reload
assert_equal('new', ticket1.state.name, 'ticket1.state new')
@ -3172,14 +3172,14 @@ class TicketTriggerTest < ActiveSupport::TestCase
ticket1.reload
assert_equal(1, ticket1.articles.count)
Observer::Transaction.commit
TransactionDispatcher.commit
ticket1.reload
assert_equal(2, ticket1.articles.count)
ticket1.priority = Ticket::Priority.lookup(name: '2 normal')
ticket1.save!
Observer::Transaction.commit
TransactionDispatcher.commit
ticket1.reload
assert_equal(2, ticket1.articles.count)
@ -3198,7 +3198,7 @@ class TicketTriggerTest < ActiveSupport::TestCase
created_by_id: 1,
)
Observer::Transaction.commit
TransactionDispatcher.commit
ticket1.reload
assert_equal(4, ticket1.articles.count)
assert_equal('some_loop_sender@example.com', ticket1.articles[2].from)
@ -3219,7 +3219,7 @@ class TicketTriggerTest < ActiveSupport::TestCase
created_by_id: 1,
)
Observer::Transaction.commit
TransactionDispatcher.commit
ticket1.reload
assert_equal(6, ticket1.articles.count)
assert_equal('some_loop_sender@example.com', ticket1.articles[4].from)
@ -3240,7 +3240,7 @@ class TicketTriggerTest < ActiveSupport::TestCase
created_by_id: 1,
)
Observer::Transaction.commit
TransactionDispatcher.commit
ticket1.reload
assert_equal(8, ticket1.articles.count)
assert_equal('some_loop_sender@example.com', ticket1.articles[6].from)
@ -3261,7 +3261,7 @@ class TicketTriggerTest < ActiveSupport::TestCase
created_by_id: 1,
)
Observer::Transaction.commit
TransactionDispatcher.commit
ticket1.reload
assert_equal(10, ticket1.articles.count)
assert_equal('some_loop_sender@example.com', ticket1.articles[8].from)
@ -3282,7 +3282,7 @@ class TicketTriggerTest < ActiveSupport::TestCase
created_by_id: 1,
)
Observer::Transaction.commit
TransactionDispatcher.commit
ticket1.reload
assert_equal(12, ticket1.articles.count)
assert_equal('some_loop_sender@example.com', ticket1.articles[10].from)
@ -3303,7 +3303,7 @@ class TicketTriggerTest < ActiveSupport::TestCase
created_by_id: 1,
)
Observer::Transaction.commit
TransactionDispatcher.commit
ticket1.reload
assert_equal(14, ticket1.articles.count)
assert_equal('some_loop_sender@example.com', ticket1.articles[12].from)
@ -3324,7 +3324,7 @@ class TicketTriggerTest < ActiveSupport::TestCase
created_by_id: 1,
)
Observer::Transaction.commit
TransactionDispatcher.commit
ticket1.reload
assert_equal(16, ticket1.articles.count)
assert_equal('some_loop_sender@example.com', ticket1.articles[14].from)
@ -3345,7 +3345,7 @@ class TicketTriggerTest < ActiveSupport::TestCase
created_by_id: 1,
)
Observer::Transaction.commit
TransactionDispatcher.commit
ticket1.reload
assert_equal(18, ticket1.articles.count)
assert_equal('some_loop_sender@example.com', ticket1.articles[16].from)
@ -3366,7 +3366,7 @@ class TicketTriggerTest < ActiveSupport::TestCase
created_by_id: 1,
)
Observer::Transaction.commit
TransactionDispatcher.commit
ticket1.reload
assert_equal(20, ticket1.articles.count)
assert_equal('some_loop_sender@example.com', ticket1.articles[18].from)
@ -3387,7 +3387,7 @@ class TicketTriggerTest < ActiveSupport::TestCase
created_by_id: 1,
)
Observer::Transaction.commit
TransactionDispatcher.commit
ticket1.reload
assert_equal(21, ticket1.articles.count)
assert_equal('some_loop_sender@example.com', ticket1.articles[20].from)
@ -3407,7 +3407,7 @@ class TicketTriggerTest < ActiveSupport::TestCase
created_by_id: 1,
)
Observer::Transaction.commit
TransactionDispatcher.commit
ticket1.reload
assert_equal(22, ticket1.articles.count)
assert_equal('some_loop_sender@example.com', ticket1.articles[21].from)
@ -3507,7 +3507,7 @@ class TicketTriggerTest < ActiveSupport::TestCase
assert_equal(1, ticket1.articles.count, 'ticket1.articles verify')
assert_equal([], ticket1.tag_list)
Observer::Transaction.commit
TransactionDispatcher.commit
ticket1.reload
assert_equal('some <b>title</b> äöüß', ticket1.title, 'ticket1.title verify')
@ -3633,7 +3633,7 @@ class TicketTriggerTest < ActiveSupport::TestCase
assert_equal('2 normal', ticket1.priority.name, 'ticket1.priority verify')
assert_equal(1, ticket1.articles.count, 'ticket1.articles verify')
assert_equal([], ticket1.tag_list)
Observer::Transaction.commit
TransactionDispatcher.commit
ticket1.reload
assert_equal('test 1', ticket1.title, 'ticket1.title verify')
assert_equal('Users', ticket1.group.name, 'ticket1.group verify')
@ -3671,7 +3671,7 @@ class TicketTriggerTest < ActiveSupport::TestCase
assert_equal(1, ticket2.articles.count, 'ticket2.articles verify')
assert_equal([], ticket2.tag_list)
Observer::Transaction.commit
TransactionDispatcher.commit
ticket2.reload
assert_equal('test 2', ticket2.title, 'ticket2.title verify')
@ -3710,7 +3710,7 @@ class TicketTriggerTest < ActiveSupport::TestCase
assert_equal('2 normal', ticket3.priority.name, 'ticket3.priority verify')
assert_equal(1, ticket3.articles.count, 'ticket3.articles verify')
assert_equal([], ticket3.tag_list)
Observer::Transaction.commit
TransactionDispatcher.commit
ticket3.reload
assert_equal('test 3', ticket3.title, 'ticket3.title verify')
assert_equal('Users', ticket3.group.name, 'ticket3.group verify')
@ -3785,7 +3785,7 @@ class TicketTriggerTest < ActiveSupport::TestCase
assert_equal(1, ticket1.articles.count, 'ticket1.articles verify')
assert_equal([], ticket1.tag_list)
Observer::Transaction.commit
TransactionDispatcher.commit
ticket1.reload
assert_equal('test 1', ticket1.title, 'ticket1.title verify')
@ -3830,7 +3830,7 @@ class TicketTriggerTest < ActiveSupport::TestCase
assert_equal(1, ticket2.articles.count, 'ticket2.articles verify')
assert_equal([], ticket2.tag_list)
Observer::Transaction.commit
TransactionDispatcher.commit
ticket2.reload
assert_equal('test 1', ticket2.title, 'ticket2.title verify')
@ -3901,7 +3901,7 @@ class TicketTriggerTest < ActiveSupport::TestCase
assert_equal(1, ticket3.articles.count, 'ticket3.articles verify')
assert_equal([], ticket3.tag_list)
Observer::Transaction.commit
TransactionDispatcher.commit
ticket3.reload
assert_equal('test 1', ticket3.title, 'ticket3.title verify')
@ -3939,7 +3939,7 @@ class TicketTriggerTest < ActiveSupport::TestCase
assert_equal(1, ticket4.articles.count, 'ticket4.articles verify')
assert_equal([], ticket4.tag_list)
Observer::Transaction.commit
TransactionDispatcher.commit
ticket4.reload
assert_equal('test 1', ticket4.title, 'ticket4.title verify')
@ -4089,7 +4089,7 @@ class TicketTriggerTest < ActiveSupport::TestCase
ticket1.owner_id = agent1.id
ticket1.save!
Observer::Transaction.commit
TransactionDispatcher.commit
# this will add a tag by trigger
ticket1.reload
@ -4108,7 +4108,7 @@ class TicketTriggerTest < ActiveSupport::TestCase
ticket1.owner_id = agent2.id
ticket1.save!
Observer::Transaction.commit
TransactionDispatcher.commit
ticket1.reload
assert_equal('some title äöüß', ticket1.title, 'ticket1.title verify')
@ -4126,7 +4126,7 @@ class TicketTriggerTest < ActiveSupport::TestCase
ticket1.owner_id = agent1.id
ticket1.save!
Observer::Transaction.commit
TransactionDispatcher.commit
ticket1.reload
assert_equal('some title äöüß', ticket1.title, 'ticket1.title verify')
@ -4144,7 +4144,7 @@ class TicketTriggerTest < ActiveSupport::TestCase
ticket2.owner_id = agent1.id
ticket2.save!
Observer::Transaction.commit
TransactionDispatcher.commit
ticket2.reload
assert_equal('some title äöüß', ticket2.title, 'ticket2.title verify')
@ -4214,7 +4214,7 @@ class TicketTriggerTest < ActiveSupport::TestCase
assert_equal('Sabine Schütz <some_sender@example.com>', ticket1.articles.first.from, 'ticket1.articles.first.from verify')
assert_equal([], ticket1.tag_list)
Observer::Transaction.commit
TransactionDispatcher.commit
ticket1.reload
assert_equal('test 1', ticket1.title, 'ticket1.title verify')
@ -4353,7 +4353,7 @@ class TicketTriggerTest < ActiveSupport::TestCase
assert_nil(customer.organization_id)
assert_equal(0, ticket.reload.articles.count, 'ticket.articles verify')
Observer::Transaction.commit
TransactionDispatcher.commit
assert_equal(1, ticket.reload.articles.count, 'ticket.articles verify')
@ -4418,7 +4418,7 @@ class TicketTriggerTest < ActiveSupport::TestCase
assert_equal(1, ticket1.articles.count, 'ticket1.articles verify')
assert_equal([], ticket1.tag_list)
Observer::Transaction.commit
TransactionDispatcher.commit
ticket1.reload
assert_equal('some <b>title</b> äöüß', ticket1.title, 'ticket1.title verify')
@ -4489,7 +4489,7 @@ class TicketTriggerTest < ActiveSupport::TestCase
assert_equal(1, ticket1.articles.count, 'ticket1.articles verify')
assert_equal([], ticket1.tag_list)
Observer::Transaction.commit
TransactionDispatcher.commit
ticket1.reload
assert_equal('some <b>title</b> äöüß', ticket1.title, 'ticket1.title verify')