-
Notifications
You must be signed in to change notification settings - Fork 31
Open
Description
With the introduction of the new _rev field for survey questions in Planet, myPlanet must properly synchronize this field and validate its consistency before completing any synchronization process.
Goal
Ensure that myPlanet:
- Synchronizes the
_revfield for each survey question. - Validates that the
_revvalue matches the expected version before syncing. - Prevents survey synchronization when question changes could lead to data inconsistencies.
Current Problem
- myPlanet does not currently synchronize or validate the
_revfield for survey questions. - There is no mechanism to detect whether a question has been modified since the last synchronization.
- This can result in:
- Responses being linked to incorrect or outdated question versions.
- Data inconsistencies between Planet and myPlanet.
- Potential data integrity issues in the local database.
Proposed Solution
- Synchronize the
_revfield for each question when surveys are downloaded or updated from Planet. - During the synchronization process:
- Validate that the
_revvalue of each question matches the locally stored version. - If any mismatch is detected:
- Block or cancel the synchronization of the survey.
- Log or notify that version conflicts exist.
- Validate that the
- Ensure that stored responses are always associated with the same question version (
_rev) used when the response was created.
Benefits
- Preserves data integrity and consistency.
- Prevents silent errors during synchronization.
- Improves traceability of survey changes.
- Enhances stability of the survey system in myPlanet.
- Reduces the risk of invalid or inconsistent data.
Technical Considerations
- The
_revfield must be stored and validated per question, not only at the survey level. - Expected behavior in case of conflicts should be clearly defined:
- Cancel synchronization.
- Notify the user.
- Log the conflict for auditing.
- Validation should be applied during both initial sync and subsequent updates.
Context
This validation is critical for surveys that have already been answered, as any post-deployment changes to questions can compromise the validity of collected data.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels