-
Notifications
You must be signed in to change notification settings - Fork 19
Description
TL;DR
We should add more information about study edits to the study log.
Description
While working on study response limit, we decided that it would be a good idea to log changes to the study's response limit. The easiest place to do this is with our existing Study Log system, which right now is just used to track study state changes, along with comments and declarations.
Implementation
The Study Log model was intended to track 'actions', so fitting other study changes into this structure may require model/database changes. There is a field called 'extras', which is an object that stores comments and declarations. For now, we can add easily add new keys/values to the 'extras' object. But if in the future we want to add logging for many different types of study attributes, then it might make sense to either expand this model/table to include more fields/columns, or create a new model/table for logging study modifications, rather than state changes.
In the future, we may also want to track the mapping between study "states" (snapshots/versions) and individual responses, which would involve recording a log of all study changes, assigning IDs to those versions, and capturing the current version value with each response.