# Embedded topic goes to Uncategorized

**URL:** <https://meta.discourse.org/t/embedded-topic-goes-to-uncategorized/70041>\
**Category:** Bug\
**Created:** [September 14, 2017, 12:29pm UTC](https://meta.discourse.org/t/embedded-topic-goes-to-uncategorized/70041 "2017-09-14T12:29:36Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![hellekin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/hellekin/32/51636_2.png) [@hellekin](https://meta.discourse.org/u/hellekin)\
**Post date:** [September 29, 2017, 8:30am UTC](https://meta.discourse.org/t/embedded-topic-goes-to-uncategorized/70041/2 "2017-09-29T08:30:45Z")

</div>

I traced back the problem to the `topic_spec.rb` where it says a topic with an existing topic timer when moved to a new category **should not inherit category’s auto close hours**.

> <https://github.com/discourse/discourse/blob/tests-passed/spec/models/topic_spec.rb#L1087>

If it makes sense when moving a topic from an auto-close category to another, although the rationale remains unclear, it seems on the contrary to be logical to remove the topic timer when moving it to a category that does not have a topic timer.

The use-case I’m referring to is the following: I have a private conference set with an email-in and a topic timer where I throw all kinds of stuff I find interesting online. The topic timer allows to quickly ditch what is not picked up and keep an archive in case someone wants to resurrect the topic. If a topic is picked up, it usually evolves into an article, which is at some point moved to a public category with no topic timer. There, I would expect the topic to lose the topic timer, and there’s no UI to remove it forcefully.

The only way to do it currently is to copy-paste the article into a new topic, losing the history and link to the original topic. So instead, there should be a revised specification added to that portion of `topic_spec.rb`:

- #change\_category\_to\_id
  - with a previous category
    - to a different category
      - when new category is set to auto close by default
        - when topic has an existing topic timer
          - should not inherit category’s auto close hours

      - **when new category has no topic timer**
        - **when topic has an existing topic timer**
          - **should remove topic timer**

An alternative would be to add a UI element to remove the topic timer, but this would be an expedient as it would not work with the API.

* * *

I see that the fact a topic is moving from a private category to a public category also affects resetting the topic timer in the above use-case. In the `convert_to_public_topic` method below, the `Topic.transaction` should then check for the state of the timer.

> <https://github.com/discourse/discourse/blob/tests-passed/app/models/topic_converter.rb#L10>

I also realize that `topic timer` might not be the right term in this case. I found [the topic\_timer model](https://github.com/discourse/discourse/blob/tests-passed/app/models/topic_timer.rb) but it seems to be used for other things as well, like auto-publishing to a category on a given schedule. This one sounds great, I had no idea Discourse could do that. Any pointers?

---

_[View the full topic](https://meta.discourse.org/t/embedded-topic-goes-to-uncategorized/70041)._
