# Deleting posts doesn't reset last activity date

**URL:** https://meta.discourse.org/t/deleting-posts-doesnt-reset-last-activity-date/31348
**Category:** Bug
**Created:** [July 23, 2015, 11:39am UTC](https://meta.discourse.org/t/deleting-posts-doesnt-reset-last-activity-date/31348 "2015-07-23T11:39:28Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![davemaxwell](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/davemaxwell/32/108393_2.png) [@davemaxwell](https://meta.discourse.org/u/davemaxwell)
#### Post date: [July 23, 2015, 11:39am UTC](https://meta.discourse.org/t/deleting-posts-doesnt-reset-last-activity-date/31348/1 "2015-07-23T11:39:28Z")

</div>

We were having an issue with the auto-close feature where threads which have been dormant for a while weren’t being closed automatically (we have it set to close 30 days after the last activity). Doing some moderating, I have found that deleting the last post in a thread doesn’t reset the last activity date on the thread. So if a spammer wannabe comes in and lays down a crap post two months after the last post, we lose those two months for the auto-close functionality to work.

Edit: It seems to be the “Category” level dates/activity periods which are incorrect (see screenshots in post [#3](https://meta.discourse.org/t/deleting-posts-doesnt-reset-last-activity-date/31348/3))

Example thread: [http://community.sitepoint.com/t/javascript-add-css-to-style-wont-work/190090/18](http://community.sitepoint.com/t/javascript-add-css-to-style-wont-work/190090/18)

Notice how the last post is actually May 20 (deleted post was made and deleted July 21)

 ![](https://global.discourse-cdn.com/meta/original/3X/f/0/f0d2a40c09356d9298b912167f1c070bceafd1d4.png)

This is the category page which shows the last activity period after the post was deleted. It still shows the relative time to the deleted post.

 ![](https://global.discourse-cdn.com/meta/original/3X/a/a/aa30f4dd490871642d8daba6b350dd8dfc0b129a.png)

To recreate:

1. Find an older post (say two months old) and add a post to the thread.
2. Delete the post (I was using the delete spammer functionality but just deleting the post does it as well)
3. Notice that the last activity date will still have the date/time of the deleted post, not the “old” last post.

---

<div class="post-metadata">

### Author: ![RaceProUK](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/raceprouk/32/115844_2.png) [@RaceProUK](https://meta.discourse.org/u/RaceProUK)
#### Post date: [July 23, 2015, 12:55pm UTC](https://meta.discourse.org/t/deleting-posts-doesnt-reset-last-activity-date/31348/2 "2015-07-23T12:55:45Z")

</div>

If it was ‘Last Post’ I’d agree, but ‘Last Activity’? I’m not so sure 😕

---

<div class="post-metadata">

### Author: ![davemaxwell](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/davemaxwell/32/108393_2.png) [@davemaxwell](https://meta.discourse.org/u/davemaxwell)
#### Post date: [July 23, 2015, 1:10pm UTC](https://meta.discourse.org/t/deleting-posts-doesnt-reset-last-activity-date/31348/3 "2015-07-23T13:10:08Z")

</div>

> [@RaceProUK](#):
>
> If it was ‘Last Post’ I’d agree, but ‘Last Activity’? I’m not so sure

I was using the term in the category header - I don’t know how it’s actually stored. Last Post would be appropriate as well.

Regardless, the “in thread” dates look to be correct. It’s the In Category relationship which looks to be the one out of sync, and it seems to be the Category relationship which drives the auto-close and the thread display/sorting.

In thread:

 ![](https://global.discourse-cdn.com/meta/original/3X/e/2/e2fdc19439bca6f0867c94c4a96d8250e2b4b0e8.png)

In category (today)

 ![](https://global.discourse-cdn.com/meta/original/3X/b/b/bb188c8fa6d62ca835d617b308ba8c859a7b11e8.png)

---

<div class="post-metadata">

### Author: ![riking](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/riking/32/170938_2.png) [@riking](https://meta.discourse.org/u/riking)
#### Post date: [July 23, 2015, 4:08pm UTC](https://meta.discourse.org/t/deleting-posts-doesnt-reset-last-activity-date/31348/4 "2015-07-23T16:08:35Z")

</div>

> [@davemaxwell](#):
>
> It’s the In Category relationship which looks to be the one out of sync, and it seems to be the Category relationship which drives the auto-close and the thread display/sorting.

Actually, it’s `topics.bumped_at` that you’re looking for 😉

---

<div class="post-metadata">

### Author: ![cpradio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cpradio/32/4970_2.png) [@cpradio](https://meta.discourse.org/u/cpradio)
#### Post date: [July 23, 2015, 4:09pm UTC](https://meta.discourse.org/t/deleting-posts-doesnt-reset-last-activity-date/31348/5 "2015-07-23T16:09:00Z")

</div>

Would it be easy for it to use the “last reply” instead?

---

<div class="post-metadata">

### Author: ![riking](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/riking/32/170938_2.png) [@riking](https://meta.discourse.org/u/riking)
#### Post date: [July 23, 2015, 4:09pm UTC](https://meta.discourse.org/t/deleting-posts-doesnt-reset-last-activity-date/31348/6 "2015-07-23T16:09:38Z")

</div>

No, because bumped\_at gets, ah, bumped for edits to the last post, and doesn’t get bumped for the topic closing.

---

<div class="post-metadata">

### Author: ![cpradio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cpradio/32/4970_2.png) [@cpradio](https://meta.discourse.org/u/cpradio)
#### Post date: [July 23, 2015, 4:17pm UTC](https://meta.discourse.org/t/deleting-posts-doesnt-reset-last-activity-date/31348/7 "2015-07-23T16:17:46Z")

</div>

But that is an answer to a different question…

 ![](https://global.discourse-cdn.com/meta/original/3X/8/b/8b2ddcb44ecab944643dc471f8f578a034904d1f.png)

This specifically states “last post” is X old. An edit doesn’t derive its age, the creation of its post initially derives its age

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [August 30, 2018, 6:07am UTC](https://meta.discourse.org/t/deleting-posts-doesnt-reset-last-activity-date/31348/8 "2018-08-30T06:07:05Z")

</div>

This ancient issue is now neatly resolved using:

> [@Reply without bumping topic](https://meta.discourse.org/t/reply-without-bumping-topic/94406):
>
> As a staff member you sometimes have the need to post a reply without bumping the topic to the top of the list. And now you can do exactly that. There’s a new “Toggle topic bump” in the composer’s reply selector. [image] An anchor will appear at the top of the composer when bumping is disabled. [image] Another new feature is the “Reset Bump Date” action in topic wrench menu. It changes the topic’s bump date to the date of the last visible post in the topic. That’s quite useful when the l…

After deleting a post you can reset the bump date if you wish.

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [August 30, 2018, 6:07am UTC](https://meta.discourse.org/t/deleting-posts-doesnt-reset-last-activity-date/31348/9 "2018-08-30T06:07:12Z")

</div>


