Auto Close topic after 24 or 96 hours not working as expected


(Dean Taylor) #1

This may have been caught and fixed already…

When a topic is set to close after 24 or 96 hours after last reply it appears close immediately.

96 and 24 are the only values I have tried.

The following post is added after a minute or so:

This topic was automatically closed 0 minutes after the last reply. New replies are no longer allowed.

This has not been tested on latest - but it was in this version:
Discourse 1.3.0.beta7 - https://github.com/discourse/discourse version 875a013ec76e7ce0cbb95a61223cbbd16ed31d4a

I did however check the first line of all commit comments for the last 17 days - only one mentioned “auto” and it wasn’t to do with closing a topic.


After thought

The last post was 10 days ago however.

But I was expecting the topic to close 24 / 96 hours from the time it was set to auto close (if there wasn’t a new post before then).


(Jeff Atwood) #2

If this was broken we would know as BBS boing boing would have problems. They have an auto close main category there.

Possible there is an issue with close after last reply though. We can try it on this topic.


(Dean Taylor) #3

I’m guessing it’s that applying an “Auto Close based on last post” to a topic where the last post is older than the Auto Close duration closes it immediately…
… which for me was unexpected - as I wished for at least the Auto Close duration to pass first.


(Kane York) #4

Okay, I think a warning in that case would suffice. And fixing the close message.

<div class="warning">
    <i class="fa fa-warning"></i> The last post in the topic is already 24 hours old, so the topic will be closed immediately.
  </div>


(Jeff Atwood) #5

Well that is a bug @neil it should not apply to the last post at the time of creating the rule!


(Kane York) #6

If you give a time for “after the last post” that would apply to right now, it gives you a warning, and skips the queue if you submit.


edit: should added tests


(Neil Lalonde) #7

(Sam Saffron) #8

(Sam Saffron) #9

Is this really fixed? PR is still in Limbo @riking Fixes for topic auto closing by riking · Pull Request #3481 · discourse/discourse · GitHub


(Jeff Atwood) #10

Can you add this to your list @techapj to check into, eventually.


(Arpit Jalan) #11

Merged in via:

Thanks @riking :tada:


(Arpit Jalan) #12