# Topic Yearly Auto Archive

**URL:** https://meta.discourse.org/t/topic-yearly-auto-archive/47787
**Category:** Plugin
**Created:** [July 25, 2016, 10:55pm UTC](https://meta.discourse.org/t/topic-yearly-auto-archive/47787 "2016-07-25T22:55:18Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![eriko](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/eriko/32/1915_2.png) [@eriko](https://meta.discourse.org/u/eriko)
#### Post date: [July 25, 2016, 10:55pm UTC](https://meta.discourse.org/t/topic-yearly-auto-archive/47787/1 "2016-07-25T22:55:18Z")

</div>

This is the first draft of the plugin mentioned here: [Anyone interested in a mass automatic archiving plugin?](https://meta.discourse.org/t/anyone-interested-in-a-mass-automatic-archiving-plugin/47477)

Basically on a certain (configurable) day of the year all topics posted before a certain (configurable) day get marked as **Archived**. This happens once a year.

Example on the 120th day of the year all posts from before the 30th day of the year will get archived.

[https://github.com/eriko/auto-archive](https://github.com/eriko/auto-archive)

Work to do:

- Change to a list of days of the year (60, 120,180,240,300) and days afterwards to run (30)
- Figure out an interface to select categories to effect or not effect.

---

<div class="post-metadata">

### Author: ![meglio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/meglio/32/71444_2.png) [@meglio](https://meta.discourse.org/u/meglio)
#### Post date: [October 1, 2016, 10:08am UTC](https://meta.discourse.org/t/topic-yearly-auto-archive/47787/2 "2016-10-01T10:08:47Z")

</div>

Why would one need to mass-archive topics?

---

<div class="post-metadata">

### Author: ![eriko](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/eriko/32/1915_2.png) [@eriko](https://meta.discourse.org/u/eriko)
#### Post date: [October 1, 2016, 12:03pm UTC](https://meta.discourse.org/t/topic-yearly-auto-archive/47787/3 "2016-10-01T12:03:00Z")

</div>

In our case we are a college and conversations that span over a year gather kruft of no longer valid information. It is better to begin again the fight over smoking on campus again in the context of current policies. The old conversation still exists for reference.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [October 1, 2016, 2:56pm UTC](https://meta.discourse.org/t/topic-yearly-auto-archive/47787/4 "2016-10-01T14:56:58Z")

</div>

Another valid example is, a game company has a beta or alpha for a game. Three years later, the game is no longer like the beta or alpha and much different, if anyone even plays it any more? So why keep the alpha and beta categories at all..

---

<div class="post-metadata">

### Author: ![fefrei](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fefrei/32/119538_2.png) [@fefrei](https://meta.discourse.org/u/fefrei)
#### Post date: [October 1, 2016, 6:03pm UTC](https://meta.discourse.org/t/topic-yearly-auto-archive/47787/5 "2016-10-01T18:03:55Z")

</div>

Another example is using Discourse as a discussion platform for a lecture or course:

> [@Re-purposing a Discourse installation for a yearly event](https://meta.discourse.org/t/re-purposing-a-discourse-installation-for-a-yearly-event/34670):
>
> I’m using Discourse for a yearly event (a preparatory course at a university), both for internal use for the organizers and for discussion among participants. This year’s event has finished, and once usage has dropped below significance, I’d be okay with shutting the installation down. Next year, however, I want to have another installation ready, and the old topics available as an archive to the organizers. This leaves multiple options, and I’m not sure what is best: Archive HTML, New Instal…

---

<div class="post-metadata">

### Author: ![eriko](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/eriko/32/1915_2.png) [@eriko](https://meta.discourse.org/u/eriko)
#### Post date: [October 3, 2016, 9:57pm UTC](https://meta.discourse.org/t/topic-yearly-auto-archive/47787/6 "2016-10-03T21:57:29Z")

</div>

I found a small issue in that messages are just another form of Topics. So the code has been updated to only effect Archetype.default Topics.

---

<div class="post-metadata">

### Author: ![patrickemin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/patrickemin/32/520162_2.png) [@patrickemin](https://meta.discourse.org/u/patrickemin)
#### Post date: [March 24, 2025, 10:37pm UTC](https://meta.discourse.org/t/topic-yearly-auto-archive/47787/7 "2025-03-24T22:37:05Z")

</div>

Good idea, I would be more in favor of archiving a **whole category** after a set amount of time.

Use case: a newsflash category.

---

<div class="post-metadata">

### Author: ![Jagster](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jagster/32/192154_2.png) [@Jagster](https://meta.discourse.org/u/Jagster)
#### Post date: [March 24, 2025, 10:44pm UTC](https://meta.discourse.org/t/topic-yearly-auto-archive/47787/8 "2025-03-24T22:44:43Z")

</div>

Several outdated newsflash **categories** 😳 Why would someone ever do such structure?

---

<div class="post-metadata">

### Author: ![patrickemin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/patrickemin/32/520162_2.png) [@patrickemin](https://meta.discourse.org/u/patrickemin)
#### Post date: [March 24, 2025, 11:16pm UTC](https://meta.discourse.org/t/topic-yearly-auto-archive/47787/9 "2025-03-24T23:16:16Z")

</div>

No, I mean, archive the posts in a category after a certain period of time. The posts in a news category, for example, are inherently perishable, so this is a good example of use. A category could have an auto archive property.
