[openstreetmap/openstreetmap-website] What should we do about note comments? (Issue #3831)
Tobias
notifications at github.com
Thu Oct 5 04:22:58 UTC 2023
@gravitystorm how would the concept of **closing/reopening notes** work with this new data model?
One way would be…
- `Notes` has a field `open=true (default)`
- `NoteComments` have a field `action=null (default)|close|reopen`
- Whenever a comment is saved, a hook is triggered that updates the `Notes.open` flag.
- Should this update be done in a Transaction to guard against edge cases where the async update fails?
In addition, we could use the same mechanism to denormalize `lastOpened_by` and `lastClosed_by` flags on the `Notes`. However whoever will work on this should decide based on performance considerations if this is needed vor the UI or API output.
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/3831#issuecomment-1748010807
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/issues/3831/1748010807 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20231004/5e8e5d48/attachment.htm>
More information about the rails-dev
mailing list