DeanMarkTaylor reported a bug in Discourse 1.3.0.beta7 where topics set to auto-close 24 or 96 hours after the last reply were closing immediately if the last post predated the setting. codinghorror noted that major sites like Boing Boing use this feature without issue, suggesting the problem might be specific to the “close after last reply” logic. DeanMarkTaylor hypothesized that the system incorrectly calculates the duration from the moment the rule is applied rather than waiting for the full duration to pass. riking proposed adding a warning message to inform users if the last post is already older than the specified duration, accompanied by a UI update. codinghorror confirmed this behavior was indeed a bug, stating the rule should not apply retroactively to existing posts. riking submitted a fix via PR #3481 to validate the time and skip the queue if the condition is met immediately. sam questioned if the fix was active while the PR was pending. Finally, techAPJ confirmed the issue was resolved after the fix was merged into the codebase.
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).
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.
</div>