This repository has been archived on 2023-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
osr-discourse-src/app/assets/javascripts/discourse/app
Martin Brennan 5268568d23
FEATURE: Remove user topic timers and migrate to bookmarks with reminders (#10474)
This PR removes the user reminder topic timers, because that system has been supplanted and improved by bookmark reminders. The option is removed from the UI and all existing user reminder topic timers are migrated to bookmark reminders.

Migration does this:

* Get all topic_timers with status_type 5 (reminders)
* Gets all bookmarks where the user ID and topic ID match
* Loops through the found topic timers
  * If there is no bookmark for the OP of the topic, then we just create a bookmark with a reminder
  * If there is a bookmark for the OP of the topic and it does **not** have a reminder set, then just 
update it with the topic timer reminder
  * If there is a bookmark for the OP of the topic with a reminder then just discard the topic timer
* Cancels all outstanding user reminder topic timers
* **Trashes (not deletes) all user reminder topic timers**

Notes:

* For now I have left the user reminder topic timer job class in place; this is so the jobs can be cancelled in the migration. It and the specs will be deleted in the next PR.
* At a later date I will write a migration to delete all trashed user topic timers. They are not deleted here in case there are data issues and they need to be recovered.
* A future PR will change the UI of the topic timer modal to make it look more like the bookmark modal.
2020-09-14 11:11:55 +10:00
..
adapters DEV: apply new coding standards (#10592) 2020-09-04 13:42:47 +02:00
components FEATURE: Remove user topic timers and migrate to bookmarks with reminders (#10474) 2020-09-14 11:11:55 +10:00
controllers FEATURE: Remove user topic timers and migrate to bookmarks with reminders (#10474) 2020-09-14 11:11:55 +10:00
helpers DEV: apply new coding standards (#10592) 2020-09-04 13:42:47 +02:00
initializers DEV: apply new coding standards (#10592) 2020-09-04 13:42:47 +02:00
lib DEV - versions of JS files written to a JS file to be included by loa… (#10649) 2020-09-11 13:53:56 -04:00
mixins DEV: apply new coding standards (#10592) 2020-09-04 13:42:47 +02:00
models DEV: apply new coding standards (#10592) 2020-09-04 13:42:47 +02:00
pre-initializers DEV: apply new coding standards (#10592) 2020-09-04 13:42:47 +02:00
raw-views DEV: apply new coding standards (#10592) 2020-09-04 13:42:47 +02:00
routes FEATURE: Remove user topic timers and migrate to bookmarks with reminders (#10474) 2020-09-14 11:11:55 +10:00
services DEV: apply new coding standards (#10592) 2020-09-04 13:42:47 +02:00
templates FEATURE: Remove user topic timers and migrate to bookmarks with reminders (#10474) 2020-09-14 11:11:55 +10:00
widgets FIX: handles different cases of canInvite/canRemove states in PM (#10607) 2020-09-08 16:35:59 +02:00
app.js DEV: apply new coding standards (#10592) 2020-09-04 13:42:47 +02:00
mapping-router.js DEV: apply new coding standards (#10592) 2020-09-04 13:42:47 +02:00