# Plugin to clear topic's custom field when timestamp gets changed

**URL:** https://meta.discourse.org/t/plugin-to-clear-topics-custom-field-when-timestamp-gets-changed/58888
**Category:** Development
**Created:** [March 11, 2017, 6:17pm UTC](https://meta.discourse.org/t/plugin-to-clear-topics-custom-field-when-timestamp-gets-changed/58888 "2017-03-11T18:17:40Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Janno\_Liivak](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/janno_liivak/32/352215_2.png) [@Janno\_Liivak](https://meta.discourse.org/u/Janno_Liivak)
#### Post date: [March 11, 2017, 6:17pm UTC](https://meta.discourse.org/t/plugin-to-clear-topics-custom-field-when-timestamp-gets-changed/58888/1 "2017-03-11T18:17:40Z")

</div>

Is it possible for plugin to act on topic timestamp change? Is there an example of it?

---

<div class="post-metadata">

### Author: ![joebuhlig](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/joebuhlig/32/193054_2.png) [@joebuhlig](https://meta.discourse.org/u/joebuhlig)
#### Post date: [March 11, 2017, 7:23pm UTC](https://meta.discourse.org/t/plugin-to-clear-topics-custom-field-when-timestamp-gets-changed/58888/2 "2017-03-11T19:23:31Z")

</div>

Take a look at `DiscourseEvent`. You can tie into those via plugin and do stuff when they happen. You can find the list of event by [searching the repo](https://github.com/discourse/discourse/search?utf8=%E2%9C%93&q=discourseevent).

The ones that may apply to what you’re looking for:

- `post_destroyed`
- `topic_destroyed`
- `before_create_post`
- `before_create_topic`
- `post_edited`
- `topic_status_updated`
