Fixes #3469: Startup fails with "Circular dependency detected while autoloading constant Tag::WritesToTicketHistory (RuntimeError)".

This commit is contained in:
Thorsten Eckel 2021-03-25 09:30:18 +01:00
parent c4ecbb7553
commit c463ee0e9d
36 changed files with 41 additions and 41 deletions

View file

@ -138,18 +138,6 @@ Metrics/AbcSize:
- 'app/models/concerns/has_rich_text.rb'
- 'app/models/concerns/has_search_index_backend.rb'
- 'app/models/concerns/has_search_sortable.rb'
- 'app/models/concerns/ticket/article/adds_metadata_email.rb'
- 'app/models/concerns/ticket/article/adds_metadata_general.rb'
- 'app/models/concerns/ticket/article/adds_metadata_origin_by_id.rb'
- 'app/models/concerns/ticket/article/enqueue_communicate_email_job.rb'
- 'app/models/concerns/ticket/article/enqueue_communicate_facebook_job.rb'
- 'app/models/concerns/ticket/article/enqueue_communicate_sms_job.rb'
- 'app/models/concerns/ticket/article/enqueue_communicate_telegram_job.rb'
- 'app/models/concerns/ticket/article/enqueue_communicate_twitter_job.rb'
- 'app/models/concerns/ticket/article/resets_ticket_state.rb'
- 'app/models/concerns/ticket/sets_last_owner_update_time.rb'
- 'app/models/concerns/ticket/touches_associations.rb'
- 'app/models/concerns/user/performs_geo_lookup.rb'
- 'app/models/cti/caller_id.rb'
- 'app/models/cti/driver/base.rb'
- 'app/models/cti/driver/placetel.rb'
@ -196,8 +184,17 @@ Metrics/AbcSize:
- 'app/models/text_module.rb'
- 'app/models/ticket.rb'
- 'app/models/ticket/article.rb'
- 'app/models/ticket/article/adds_metadata_email.rb'
- 'app/models/ticket/article/adds_metadata_general.rb'
- 'app/models/ticket/article/adds_metadata_origin_by_id.rb'
- 'app/models/ticket/article/assets.rb'
- 'app/models/ticket/article/enqueue_communicate_email_job.rb'
- 'app/models/ticket/article/enqueue_communicate_facebook_job.rb'
- 'app/models/ticket/article/enqueue_communicate_sms_job.rb'
- 'app/models/ticket/article/enqueue_communicate_telegram_job.rb'
- 'app/models/ticket/article/enqueue_communicate_twitter_job.rb'
- 'app/models/ticket/article/has_ticket_contact_attributes_impact.rb'
- 'app/models/ticket/article/resets_ticket_state.rb'
- 'app/models/ticket/assets.rb'
- 'app/models/ticket/escalation.rb'
- 'app/models/ticket/number/date.rb'
@ -207,8 +204,10 @@ Metrics/AbcSize:
- 'app/models/ticket/screen_options.rb'
- 'app/models/ticket/search.rb'
- 'app/models/ticket/search_index.rb'
- 'app/models/ticket/sets_last_owner_update_time.rb'
- 'app/models/ticket/state.rb'
- 'app/models/ticket/subject.rb'
- 'app/models/ticket/touches_associations.rb'
- 'app/models/token.rb'
- 'app/models/transaction.rb'
- 'app/models/transaction/clearbit_enrichment.rb'
@ -221,6 +220,7 @@ Metrics/AbcSize:
- 'app/models/trigger/assets.rb'
- 'app/models/user.rb'
- 'app/models/user/assets.rb'
- 'app/models/user/performs_geo_lookup.rb'
- 'app/models/user/search.rb'
- 'app/models/user/search_index.rb'
- 'app/models/user_device.rb'
@ -533,17 +533,6 @@ Metrics/CyclomaticComplexity:
- 'app/models/concerns/has_rich_text.rb'
- 'app/models/concerns/has_search_index_backend.rb'
- 'app/models/concerns/has_search_sortable.rb'
- 'app/models/concerns/ticket/article/adds_metadata_email.rb'
- 'app/models/concerns/ticket/article/adds_metadata_general.rb'
- 'app/models/concerns/ticket/article/adds_metadata_origin_by_id.rb'
- 'app/models/concerns/ticket/article/enqueue_communicate_email_job.rb'
- 'app/models/concerns/ticket/article/enqueue_communicate_facebook_job.rb'
- 'app/models/concerns/ticket/article/enqueue_communicate_sms_job.rb'
- 'app/models/concerns/ticket/article/enqueue_communicate_twitter_job.rb'
- 'app/models/concerns/ticket/article/resets_ticket_state.rb'
- 'app/models/concerns/ticket/sets_last_owner_update_time.rb'
- 'app/models/concerns/ticket/touches_associations.rb'
- 'app/models/concerns/user/performs_geo_lookup.rb'
- 'app/models/cti/caller_id.rb'
- 'app/models/cti/driver/base.rb'
- 'app/models/cti/driver/placetel.rb'
@ -572,8 +561,16 @@ Metrics/CyclomaticComplexity:
- 'app/models/store.rb'
- 'app/models/taskbar.rb'
- 'app/models/ticket/article.rb'
- 'app/models/ticket/article/adds_metadata_email.rb'
- 'app/models/ticket/article/adds_metadata_general.rb'
- 'app/models/ticket/article/adds_metadata_origin_by_id.rb'
- 'app/models/ticket/article/assets.rb'
- 'app/models/ticket/article/enqueue_communicate_email_job.rb'
- 'app/models/ticket/article/enqueue_communicate_facebook_job.rb'
- 'app/models/ticket/article/enqueue_communicate_sms_job.rb'
- 'app/models/ticket/article/enqueue_communicate_twitter_job.rb'
- 'app/models/ticket/article/has_ticket_contact_attributes_impact.rb'
- 'app/models/ticket/article/resets_ticket_state.rb'
- 'app/models/ticket/assets.rb'
- 'app/models/ticket/escalation.rb'
- 'app/models/ticket/number/date.rb'
@ -581,7 +578,9 @@ Metrics/CyclomaticComplexity:
- 'app/models/ticket/screen_options.rb'
- 'app/models/ticket/search.rb'
- 'app/models/ticket/search_index.rb'
- 'app/models/ticket/sets_last_owner_update_time.rb'
- 'app/models/ticket/state.rb'
- 'app/models/ticket/touches_associations.rb'
- 'app/models/token.rb'
- 'app/models/transaction/clearbit_enrichment.rb'
- 'app/models/transaction/karma.rb'
@ -592,6 +591,7 @@ Metrics/CyclomaticComplexity:
- 'app/models/trigger/assets.rb'
- 'app/models/user.rb'
- 'app/models/user/assets.rb'
- 'app/models/user/performs_geo_lookup.rb'
- 'app/models/user/search.rb'
- 'app/models/user/search_index.rb'
- 'app/models/user_device.rb'
@ -763,16 +763,6 @@ Metrics/PerceivedComplexity:
- 'app/models/concerns/has_rich_text.rb'
- 'app/models/concerns/has_search_index_backend.rb'
- 'app/models/concerns/has_search_sortable.rb'
- 'app/models/concerns/ticket/article/adds_metadata_email.rb'
- 'app/models/concerns/ticket/article/adds_metadata_general.rb'
- 'app/models/concerns/ticket/article/adds_metadata_origin_by_id.rb'
- 'app/models/concerns/ticket/article/enqueue_communicate_email_job.rb'
- 'app/models/concerns/ticket/article/enqueue_communicate_facebook_job.rb'
- 'app/models/concerns/ticket/article/enqueue_communicate_twitter_job.rb'
- 'app/models/concerns/ticket/article/resets_ticket_state.rb'
- 'app/models/concerns/ticket/sets_last_owner_update_time.rb'
- 'app/models/concerns/ticket/touches_associations.rb'
- 'app/models/concerns/user/performs_geo_lookup.rb'
- 'app/models/cti/caller_id.rb'
- 'app/models/cti/driver/base.rb'
- 'app/models/cti/driver/placetel.rb'
@ -801,14 +791,23 @@ Metrics/PerceivedComplexity:
- 'app/models/taskbar.rb'
- 'app/models/ticket.rb'
- 'app/models/ticket/article.rb'
- 'app/models/ticket/article/adds_metadata_email.rb'
- 'app/models/ticket/article/adds_metadata_general.rb'
- 'app/models/ticket/article/adds_metadata_origin_by_id.rb'
- 'app/models/ticket/article/assets.rb'
- 'app/models/ticket/article/enqueue_communicate_email_job.rb'
- 'app/models/ticket/article/enqueue_communicate_facebook_job.rb'
- 'app/models/ticket/article/enqueue_communicate_twitter_job.rb'
- 'app/models/ticket/article/has_ticket_contact_attributes_impact.rb'
- 'app/models/ticket/article/resets_ticket_state.rb'
- 'app/models/ticket/escalation.rb'
- 'app/models/ticket/number/date.rb'
- 'app/models/ticket/overviews.rb'
- 'app/models/ticket/screen_options.rb'
- 'app/models/ticket/search.rb'
- 'app/models/ticket/search_index.rb'
- 'app/models/ticket/sets_last_owner_update_time.rb'
- 'app/models/ticket/touches_associations.rb'
- 'app/models/token.rb'
- 'app/models/transaction/clearbit_enrichment.rb'
- 'app/models/transaction/karma.rb'
@ -819,6 +818,7 @@ Metrics/PerceivedComplexity:
- 'app/models/trigger/assets.rb'
- 'app/models/user.rb'
- 'app/models/user/assets.rb'
- 'app/models/user/performs_geo_lookup.rb'
- 'app/models/user/search.rb'
- 'app/models/user/search_index.rb'
- 'app/models/user_device.rb'

View file

@ -4,16 +4,16 @@ require 'models/concerns/can_be_imported_examples'
require 'models/concerns/can_csv_import_examples'
require 'models/concerns/has_history_examples'
require 'models/concerns/has_tags_examples'
require 'models/concerns/tag/writes_to_ticket_history_examples'
require 'models/concerns/has_taskbars_examples'
require 'models/concerns/has_xss_sanitized_note_examples'
require 'models/concerns/has_object_manager_attributes_validation_examples'
require 'models/concerns/ticket/calls_stats_ticket_reopen_log_examples'
require 'models/concerns/ticket/enqueues_user_ticket_counter_job_examples'
require 'models/concerns/ticket/resets_pending_time_seconds_examples'
require 'models/concerns/ticket/sets_close_time_examples'
require 'models/concerns/ticket/sets_last_owner_update_time_examples'
require 'models/tag/writes_to_ticket_history_examples'
require 'models/ticket/calls_stats_ticket_reopen_log_examples'
require 'models/ticket/enqueues_user_ticket_counter_job_examples'
require 'models/ticket/escalation_examples'
require 'models/ticket/resets_pending_time_seconds_examples'
require 'models/ticket/sets_close_time_examples'
require 'models/ticket/sets_last_owner_update_time_examples'
RSpec.describe Ticket, type: :model do
subject(:ticket) { create(:ticket) }

View file

@ -7,9 +7,9 @@ require 'models/concerns/has_groups_permissions_examples'
require 'models/concerns/has_xss_sanitized_note_examples'
require 'models/concerns/can_be_imported_examples'
require 'models/concerns/has_object_manager_attributes_validation_examples'
require 'models/concerns/user/performs_geo_lookup_examples'
require 'models/user/has_ticket_create_screen_impact_examples'
require 'models/user/can_lookup_search_index_attributes_examples'
require 'models/user/has_ticket_create_screen_impact_examples'
require 'models/user/performs_geo_lookup_examples'
require 'models/concerns/has_taskbars_examples'
RSpec.describe User, type: :model do