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.
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.
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.
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.
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.
We checked this thoroughly when we ran our first 3December 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.
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.
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.
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?
This seems to be the change, but I can not tell what inspired it:
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.
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?
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.