theriex / rh

PastKey.org source and issues
https://pastkey.org
1 stars 0 forks source link

Point update notification #9

Open theriex opened 6 years ago

theriex commented 6 years ago

After editing a point, any timelines containing that point should probably be updated so their prebuilt data reflects the changes. The timeline providing the context for the point update should be all set (assuming the person editing clicked to save the timeline as prompted), but any other referencing timelines will still have the old prebuilt data. If those timelines are no longer in use, they don't need to be updated, but it would be helpful to provide a notice of updated point data so people can update if they want.

The idea here is to have a nightly process that picks up on any point edits since the last time it ran and sends mail to containing timeline owners so they can edit their timeline if they want. A copy of the email is also sent to the site admins for monitoring, and as a prompt to rebuild pubpts.json as needed.

The email provides a link leading directly to the timeline editing. The point ids are also passed along and they are automatically fetched and integrated in essentially the same way as if the "edit" link had been clicked for each one. That in turn triggers the timeline save display, so pretty much it's clicking on the email link and then clicking save.

If pubpts are updated, and the timeline data has an older version of one of the points, then the newer points are automatically integrated and there is a prompt to save the updated timeline. Just like if they had followed the link from the email notice.