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

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 - 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).

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.

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.


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.


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

1 Like

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


Is this really fixed? PR is still in Limbo @riking

1 Like

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

1 Like

Merged in via:

Thanks @riking :tada: