For audit, diffing and after-the-fact data-integrity checks.
When activity data is saved, it is sent to the backend as one large json object & is disaggregated into the report_activity, report_sourcetype, report*... tables.
We should save a copy of the raw (large json object) data on save as well. This will enable some extra auditing, diffing and integrity checking later on. The save api/service has already been done, this card just needs to update it to also save the raw json at the same time.
Acceptance Criteria:
Given I am on an activity page
When I save the disaggregated data
Then the raw json object data is saved as well
Model definition:
report_raw_activity_data (Timestamped model)
id pkey
facility_report fkey -> facility_report
activity fkey -> activity
raw_data json
Development Checklist:
[x] A report_raw_activity_data table exists
[x] Whenever activity data is saved, a create or update is done to save to save the raw data at the same time as the disaggregated data
[ ] Meets the DOD
Definition of Ready (Note: If any of these points are not applicable, mark N/A)
[ ] User story is included
[ ] User role and type are identified
[ ] Acceptance criteria are included
[ ] Wireframes are included (if required)
[ ] Design / Solution is accepted by Product Owner
[ ] Dependencies are identified (technical, business, regulatory/policy)
[ ] Story has been estimated (under 13 pts)
Definition of Done (Note: If any of these points are not applicable, mark N/A)
[ ] Acceptance criteria are tested by the CI pipeline
[ ] UI meets accessibility requirements
[ ] Configuration changes are documented, documentation and designs are updated
[ ] Passes code peer-review
[ ] Passes QA of Acceptance Criteria with verification in Dev and Test
[ ] Ticket is ready to be merged to main branch
[ ] Can be demoed in Sprint Review
[ ] Bugs or future work cards are identified and created
Description:
For audit, diffing and after-the-fact data-integrity checks. When activity data is saved, it is sent to the backend as one large json object & is disaggregated into the report_activity, report_sourcetype, report*... tables.
We should save a copy of the raw (large json object) data on save as well. This will enable some extra auditing, diffing and integrity checking later on. The save api/service has already been done, this card just needs to update it to also save the raw json at the same time.
Acceptance Criteria:
Given I am on an activity page When I save the disaggregated data Then the raw json object data is saved as well
Model definition: report_raw_activity_data (Timestamped model) id pkey facility_report fkey -> facility_report activity fkey -> activity raw_data json
Development Checklist:
Definition of Ready (Note: If any of these points are not applicable, mark N/A)
Definition of Done (Note: If any of these points are not applicable, mark N/A)
Notes:
-