# Publication of Timed Topics don't trigger new topic notifications

**URL:** https://meta.discourse.org/t/publication-of-timed-topics-dont-trigger-new-topic-notifications/139335
**Category:** Bug
**Created:** [21 januari 2020 om 20:17 UTC](https://meta.discourse.org/t/publication-of-timed-topics-dont-trigger-new-topic-notifications/139335 "2020-01-21T20:17:13Z")
**Posts on this page:** 18
**Page:** 1

<div class="post-metadata">

### Author: ![downey](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/downey/32/166878_2.png) [@downey](https://meta.discourse.org/u/downey)
#### Post date: [21 januari 2020 om 20:17 UTC](https://meta.discourse.org/t/publication-of-timed-topics-dont-trigger-new-topic-notifications/139335/1 "2020-01-21T20:17:14Z")

</div>

**TL;DR:** _It seems that timed topics aren’t triggering new-topic notifications to Watchers at publication time. The use case is to batch up a Scrum Standup notification topic per working day, and have them published at a certain time and reminders sent to the standup participants._

**Reproduce:**

- Have non-admin users Watching a particular private category.
- Ensure those users without an active session are getting email notifications of new topics created manually in the category.
- Manually create a new topic in the designated category to test the “control case” that a user would get email notifications of a new topic.
- Next, create a new staged topic in a separate private category, e.g., in the Staff category. (Optionally, edit the topic/first-post owner.) Schedule the topic to be published later, e.g., in 5 minutes.
- Wait until publishing time…

**Expected behavior:**

- Because they are Watching the specific (private) category, the non-admin users who are not active on the site will receive an e-mail notification for both types of topics (“regular” and timed).

**Actual behavior:**

- Users only receive email notification for “regular” (non-Timed) topics manually created in the designated category.

**Related commentary:**

> [@Newly-created "unlisted" Topics send "new topic" Notifications](https://meta.discourse.org/t/newly-created-unlisted-topics-send-new-topic-notifications/134598):
>
> Perhaps the title is rather verbose, but I am assuming that this is unintended. As a staff member (or a TL4 user), I can create topics as unlisted by default (rather than having to create the topic and then unlist it). Since this is available prior to posting, I would imagine that the intended usage (when doing prior to topic creation) would perhaps be rough drafting, or having the opportunity to double-check markdown prior to public viewing. Perhaps an intended usage would be for the topic its…

---

<div class="post-metadata">

### Author: ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)
#### Post date: [21 januari 2020 om 21:02 UTC](https://meta.discourse.org/t/publication-of-timed-topics-dont-trigger-new-topic-notifications/139335/2 "2020-01-21T21:02:47Z")

</div>

I just tested this out on my local development site. My user didn’t receive an email notification for a shared draft that was scheduled to be published to a protected category that they are watching. The user does receive email notifications for topics that are directly published in the protected category.

Logging in as the test user, I see that they received an “edited” notification for the topic that was published from the draft category. An “edited” notification does not generate an email though.

Edit: I also tried manually publishing a shared draft by clicking the “Publish Shared Draft” button. That also does not generate a new topic notification or a notification email. It just creates an “edited” notification for the users who are watching the category.

---

<div class="post-metadata">

### Author: ![downey](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/downey/32/166878_2.png) [@downey](https://meta.discourse.org/u/downey)
#### Post date: [21 januari 2020 om 21:09 UTC](https://meta.discourse.org/t/publication-of-timed-topics-dont-trigger-new-topic-notifications/139335/3 "2020-01-21T21:09:47Z")

</div>

> [@simon](#):
>
> Logging in as the test user, I see that they received an “edited” notification for the topic that was published from the draft category. An “edited” notification does not generate an email though.

Thanks for that clarification; it matches my experience as well. I have updated this topic’s title accordingly.

---

<div class="post-metadata">

### Author: ![JimPas](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jimpas/32/148179_2.png) [@JimPas](https://meta.discourse.org/u/JimPas)
#### Post date: [22 januari 2020 om 05:37 UTC](https://meta.discourse.org/t/publication-of-timed-topics-dont-trigger-new-topic-notifications/139335/4 "2020-01-22T05:37:44Z")

</div>

> [@simon](#):
>
> An “edited” notification does not generate an email though.

Thank you. I had some users ask me just yesterday if they should be receiving emails when posts are edited. Now I can answer them. 🙂

---

<div class="post-metadata">

### Author: ![downey](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/downey/32/166878_2.png) [@downey](https://meta.discourse.org/u/downey)
#### Post date: [22 januari 2020 om 05:40 UTC](https://meta.discourse.org/t/publication-of-timed-topics-dont-trigger-new-topic-notifications/139335/5 "2020-01-22T05:40:49Z")

</div>

Just to clarify, I believe the fact that an edit notification firing instead of a “new topic” notification is causing the unexpected behavior in this case.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [22 januari 2020 om 06:12 UTC](https://meta.discourse.org/t/publication-of-timed-topics-dont-trigger-new-topic-notifications/139335/6 "2020-01-22T06:12:20Z")

</div>

That’s because it _is_ an edit, it isn’t a new topic.

The existing topic is edited, and the category is changed.

---

<div class="post-metadata">

### Author: ![downey](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/downey/32/166878_2.png) [@downey](https://meta.discourse.org/u/downey)
#### Post date: [22 januari 2020 om 06:24 UTC](https://meta.discourse.org/t/publication-of-timed-topics-dont-trigger-new-topic-notifications/139335/7 "2020-01-22T06:24:28Z")

</div>

> [@codinghorror](#):
>
> it isn’t a new topic

Except it is a new topic from the perspective of the users. The fact that the timestamp is updated supports this view. (And treating notifications as a new topic would be consistent behavior.)

I presume the UX would be intended to function from the perspective of the user, not the developer. 😉

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [22 januari 2020 om 06:24 UTC](https://meta.discourse.org/t/publication-of-timed-topics-dont-trigger-new-topic-notifications/139335/8 "2020-01-22T06:24:59Z")

</div>

Only in the sense that it went from a private to a public category. It’s still not _new_, it just had its category changed.

---

<div class="post-metadata">

### Author: ![downey](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/downey/32/166878_2.png) [@downey](https://meta.discourse.org/u/downey)
#### Post date: [22 januari 2020 om 06:32 UTC](https://meta.discourse.org/t/publication-of-timed-topics-dont-trigger-new-topic-notifications/139335/9 "2020-01-22T06:32:30Z")

</div>

> [@codinghorror](#):
>
> it went from a private to a public category

End users would have no implicit knowledge of this fact since the topic was necessarily prepared out of their view, and was intended to be shown as “new” at the designated time. Indeed, such is the primary use case of timed topics, AFAICT.

---

<div class="post-metadata">

### Author: ![bartv](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/bartv/32/130052_2.png) [@bartv](https://meta.discourse.org/u/bartv)
#### Post date: [22 januari 2020 om 07:52 UTC](https://meta.discourse.org/t/publication-of-timed-topics-dont-trigger-new-topic-notifications/139335/10 "2020-01-22T07:52:13Z")

</div>

We checked this thoroughly when we ran our first [3December](https://meta.discourse.org/t/how-were-using-discourse-for-a-daily-design-challenge/103982) challenge. This relied completely on auto-published topics and users did get a notification at that time. If that no longer works it would be a problem for us.

---

<div class="post-metadata">

### Author: ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)
#### Post date: [22 januari 2020 om 22:22 UTC](https://meta.discourse.org/t/publication-of-timed-topics-dont-trigger-new-topic-notifications/139335/11 "2020-01-22T22:22:20Z")

</div>

> [@bartv](#):
>
> This relied completely on auto-published topics and users did get a notification at that time. If that no longer works it would be a problem for us.

I am assuming that the issue that’s being discussed here is what happens when a draft topic is published to it’s destination category. The same rules are applied to publishing a shared draft as are applied when a topic is recategorized, so both cases can be handled here.

With the current functionality, users who are watching a category will receive an “edit” notification when a shared draft is published to its destination category, or when a topic is recategorized to the watched category. Edit notifications do not generate emails, so users will not be notified by email when the draft is published.

I think this is a regression. The issue with notifications for recategorized topics was discussed previously here: [Notifications when a topic is recategorized](https://meta.discourse.org/t/notifications-when-a-topic-is-recategorized/63079).

Whether a “posted” or an “edited” notification is created is set by the value of the `new_record` parameter that is used in the call to `post_alerter.notify_post_users` in the `NotifyCategoryChange` job. That parameter defaults to `true`, but it is now explicitly set to `false` in the job. This is a recent change. There may be a good reason for it that I’m not aware of.

---

<div class="post-metadata">

### Author: ![Avraham](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/avraham/32/162302_2.png) [@Avraham](https://meta.discourse.org/u/Avraham)
#### Post date: [24 januari 2020 om 17:10 UTC](https://meta.discourse.org/t/publication-of-timed-topics-dont-trigger-new-topic-notifications/139335/12 "2020-01-24T17:10:27Z")

</div>

I’m having the same issue @downey.

I like to load up my topics as a timed topic into a private category and then auto-publish it to a public category.

But like you – even when I @ mention a team – nobody receives the notification. Seems that the re-post doesn’t create a notification. Like @codinghorror mentioned, it must be like an edited topic when the category is changed.

Tech intricacies aside, is there a way to time a post and have a specific @ mention group (like @ members) be notified?

---

<div class="post-metadata">

### Author: ![downey](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/downey/32/166878_2.png) [@downey](https://meta.discourse.org/u/downey)
#### Post date: [24 januari 2020 om 20:12 UTC](https://meta.discourse.org/t/publication-of-timed-topics-dont-trigger-new-topic-notifications/139335/13 "2020-01-24T20:12:46Z")

</div>

> [@simon](#):
>
> I think this is a regression.

This seems to be the change, but I can not tell what inspired it:

[https://github.com/discourse/discourse/pull/8750](https://github.com/discourse/discourse/pull/8750)

* * *

**Update:**

For folks in need of an urgent workaround, I was able to use the “New Post” Discourse action in Zapier to trigger notifications to our team’s chat system in lieu of the Discourse chat plugin.

I ended up working around this timed topics bug altogether and triggered the “Zap” based on the time of day, and published it directly to the destination category, so the API will trigger the “New” event and I can use the Discourse Chat Integration plugin to send out appropriate notifications.

It is also possible to watch for topics and then filter out “New topics” (Zapier still sees them as new) that appear in the desired destination category. At first I used this approach but opted for the simpler approach above so I could automate the daily creation of messages to kick off our daily standup.

---

<div class="post-metadata">

### Author: ![kris.kotlarek](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/kris.kotlarek/32/176919_2.png) [@kris.kotlarek](https://meta.discourse.org/u/kris.kotlarek)
#### Post date: [29 januari 2020 om 00:32 UTC](https://meta.discourse.org/t/publication-of-timed-topics-dont-trigger-new-topic-notifications/139335/14 "2020-01-29T00:32:28Z")

</div>

First of all, thank you for report the issue.

I think I fixed that issue in this commit: [FIX: correct notification when tag or category is added (#8801) · discourse/discourse@20e7fb1 · GitHub](https://github.com/discourse/discourse/commit/20e7fb1c958790fa2dafc80bf6fe76b0556a2b92)

Basically, I improved a little bit the logic around notification

If the user has already seen the post, the type of notification should be `edited`. The case for that is when for example OP will add category or tag which is watched by another user.

However, when the user hasn’t yet seen the post, the type of notification should be “new  
reply”. The case for that is when for example topic is under private  
category and set for publishing later. In that case, we modify an  
existing topic, however, from the user perspective, it is like a new post.

Could you confirm if that is solving the mentioned issue?

---

<div class="post-metadata">

### Author: ![downey](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/downey/32/166878_2.png) [@downey](https://meta.discourse.org/u/downey)
#### Post date: [29 januari 2020 om 00:37 UTC](https://meta.discourse.org/t/publication-of-timed-topics-dont-trigger-new-topic-notifications/139335/15 "2020-01-29T00:37:41Z")

</div>

> [@kris.kotlarek](#):
>
> I think I fixed that issue in this commit

Awesome, thank you! We will test this over the next day or two and report back.

---

<div class="post-metadata">

### Author: ![downey](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/downey/32/166878_2.png) [@downey](https://meta.discourse.org/u/downey)
#### Post date: [29 januari 2020 om 18:17 UTC](https://meta.discourse.org/t/publication-of-timed-topics-dont-trigger-new-topic-notifications/139335/16 "2020-01-29T18:17:53Z")

</div>

> [@kris.kotlarek](#):
>
> However, when the user hasn’t yet seen the post, the type of notification should be “new reply”. The case for that is when for example topic is under private category and set for publishing later. In that case, we modify an existing topic, however, from the user perspective, it is like a new post.

Do you know if this notification should trigger for users Watching First Post or for the chat integration filter setting of First Post Only?

---

<div class="post-metadata">

### Author: ![kris.kotlarek](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/kris.kotlarek/32/176919_2.png) [@kris.kotlarek](https://meta.discourse.org/u/kris.kotlarek)
#### Post date: [29 januari 2020 om 21:12 UTC](https://meta.discourse.org/t/publication-of-timed-topics-dont-trigger-new-topic-notifications/139335/17 "2020-01-29T21:12:10Z")

</div>

My understanding is that when the category is added (this is what is triggered when the topic is moved from let’s say private category to public category) both types of users are notified.

Firstly, people watching that specific category are notified and based on if they already saw topic or not, the decision is made if it should be `edited` or `new reply`.

Then first post watchers are notified however for them we are using different notification type called `watching first post`.

Is something still broken?

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [29 juni 2020 om 20:45 UTC](https://meta.discourse.org/t/publication-of-timed-topics-dont-trigger-new-topic-notifications/139335/18 "2020-06-29T20:45:54Z")

</div>


