discourse/spec/models
Martin Brennan edec941a87
FIX: Better tracking of topic visibility changes (#26709)
This commit introduces a few changes as a result of
customer issues with finding why a topic was relisted.
In one case, if a user edited the OP of a topic that was
unlisted and hidden because of too many flags, the topic
would get relisted by directly changing topic.visible,
instead of going via TopicStatusUpdater.

To improve tracking we:

* Introduce a visibility_reason_id to topic which functions
  in a similar way to hidden_reason_id on post, this column is
  set from the various places we change topic visibility
* Fix Post#unhide! which was directly modifying topic.visible,
  instead we use TopicStatusUpdater which sets visibility_reason_id
  and also makes a small action post
* Show the reason topic visibility changed when hovering the
  unlisted icon in topic status on topic titles
2024-04-29 10:34:46 +10:00
..
about_spec.rb
admin_dashboard_data_spec.rb
api_key_scope_spec.rb
api_key_spec.rb
application_request_spec.rb
associated_group_spec.rb
badge_grouping_spec.rb
badge_spec.rb
badge_type_spec.rb
bookmark_spec.rb
category_featured_topic_spec.rb
category_group_spec.rb
category_list_spec.rb
category_setting_spec.rb
category_spec.rb
category_tag_stat_spec.rb
category_user_spec.rb
child_theme_spec.rb
color_scheme_color_spec.rb
color_scheme_spec.rb
developer_spec.rb
digest_email_site_setting_spec.rb
directory_item_spec.rb
discourse_connect_spec.rb
do_not_disturb_timing_spec.rb
draft_sequence_spec.rb
draft_spec.rb
email_change_request_spec.rb
email_log_spec.rb
email_token_spec.rb
embeddable_host_spec.rb
emoji_spec.rb
form_template_spec.rb
given_daily_like_spec.rb
global_setting_spec.rb
group_archived_message_spec.rb
group_associated_group_spec.rb
group_history_spec.rb
group_request_spec.rb
group_spec.rb
group_user_spec.rb
incoming_link_spec.rb
incoming_links_report_spec.rb
invite_redeemer_spec.rb
invite_spec.rb
javascript_cache_spec.rb
locale_site_setting_spec.rb
mailing_list_mode_site_setting_spec.rb
notification_spec.rb
optimized_image_spec.rb
permalink_spec.rb
plugin_store_spec.rb
post_action_spec.rb FIX: Better tracking of topic visibility changes (#26709) 2024-04-29 10:34:46 +10:00
post_action_type_spec.rb
post_analyzer_spec.rb
post_detail_spec.rb
post_mover_spec.rb
post_reply_key_spec.rb
post_reply_spec.rb
post_revision_spec.rb
post_spec.rb FIX: Better tracking of topic visibility changes (#26709) 2024-04-29 10:34:46 +10:00
post_stripper_spec.rb
post_timing_spec.rb FIX: disable storing invalid post and topic timing when sent from client (#26683) 2024-04-19 18:10:50 +10:00
private_message_topic_tracking_state_spec.rb
problem_check_spec.rb
problem_check_tracker_spec.rb
published_page_spec.rb
quoted_post_spec.rb
remote_theme_spec.rb
report_spec.rb
reviewable_claimed_topic_spec.rb
reviewable_flagged_post_spec.rb
reviewable_history_spec.rb
reviewable_post_spec.rb
reviewable_queued_post_spec.rb
reviewable_score_spec.rb
reviewable_spec.rb
reviewable_user_spec.rb
s3_region_site_setting_spec.rb
screened_email_spec.rb
screened_ip_address_spec.rb
screened_url_spec.rb
search_log_spec.rb
sidebar_section_link_spec.rb
sidebar_section_spec.rb
sidebar_url_spec.rb
site_setting_spec.rb
site_spec.rb
sitemap_spec.rb
skipped_email_log_spec.rb
stylesheet_cache_spec.rb
tag_group_spec.rb
tag_spec.rb
tag_user_spec.rb
theme_field_spec.rb
theme_modifier_set_spec.rb
theme_setting_spec.rb
theme_settings_migration_spec.rb
theme_spec.rb
theme_svg_sprite_spec.rb
top_menu_item_spec.rb
top_topic_spec.rb
topic_allowed_user_spec.rb
topic_converter_spec.rb
topic_embed_spec.rb
topic_featured_users_spec.rb
topic_group_spec.rb
topic_hot_scores_spec.rb
topic_invite_spec.rb
topic_link_click_spec.rb
topic_link_spec.rb
topic_list_spec.rb
topic_participant_groups_summary_spec.rb
topic_participants_summary_spec.rb
topic_posters_summary_spec.rb
topic_spec.rb
topic_tag_spec.rb
topic_thumbnail_spec.rb
topic_timer_spec.rb
topic_tracking_state_spec.rb
topic_user_spec.rb FIX: disable storing invalid post and topic timing when sent from client (#26683) 2024-04-19 18:10:50 +10:00
topic_view_item_spec.rb
translation_override_spec.rb
trust_level3_requirements_spec.rb
trust_level_and_staff_setting_spec.rb
trust_level_setting_spec.rb
unsubscribe_key_spec.rb
upload_reference_spec.rb
upload_spec.rb
user_action_spec.rb
user_api_key_spec.rb
user_archived_message_spec.rb
user_associated_group_spec.rb
user_auth_token_spec.rb
user_avatar_spec.rb
user_badge_spec.rb
user_bookmark_list_spec.rb
user_email_spec.rb
user_export_spec.rb
user_field_spec.rb FIX: Move user reindexing into a job (#26753) 2024-04-25 20:58:34 +08:00
user_history_spec.rb
user_notification_schedule_spec.rb
user_option_spec.rb
user_profile_spec.rb
user_profile_view_spec.rb
user_search_spec.rb
user_second_factor_spec.rb
user_security_key_spec.rb
user_spec.rb
user_stat_spec.rb
user_status_spec.rb
user_summary_spec.rb
user_visit_spec.rb
username_validator_spec.rb
watched_word_spec.rb
web_crawler_request_spec.rb
web_hook_event_spec.rb
web_hook_event_type_spec.rb
web_hook_spec.rb