mirror of
https://github.com/discourse/discourse.git
synced 2024-12-02 05:29:17 -06:00
fb83757edb
Previously when inheriting category auto-close settings for a topic, those settings were disrupted if another topic timer was assigned or if a topic was closed then manually re-opened. This PR makes it so that when a topic is manually re-opened the topic auto-close settings are inherited from the category. However, they will now be based on the topic created_at date. As an example, for a topic with a category auto close hours setting of 72 (3 days): * Topic was created on 2021-02-15 08:00 * Topic was closed on 2021-02-16 10:00 * Topic was opened again on 2021-02-17 06:00 Now, the topic will inherit the auto close timer again and will close automatically at **2021-02-18 08:00**, which is based on the creation date. If the current date and time is greater than the original auto-close time (e.g. we were at 2021-02-20 13:45) then no auto-close timer is created. Note, this will not happen if the topic category auto-close setting is "based on last post". |
||
---|---|---|
.. | ||
api_keys_spec.rb | ||
category_tag_spec.rb | ||
content_security_policy_spec.rb | ||
email_style_spec.rb | ||
flags_spec.rb | ||
group_spec.rb | ||
invite_only_registration_spec.rb | ||
message_bus_spec.rb | ||
multisite_spec.rb | ||
rate_limiting_spec.rb | ||
same_ip_spammers_spec.rb | ||
spam_rules_spec.rb | ||
topic_auto_close_spec.rb | ||
topic_thumbnail_spec.rb | ||
watched_words_spec.rb |