-
-
Notifications
You must be signed in to change notification settings - Fork 187
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(projectHistoryLogs): record logs for QA data changes TASK-1506 (#…
…5489) ### 📣 Summary Record project history logs when users update the translations, transcripts, or QA answers of a submission. ### 💭 Notes Adding root_uuids to the submission metadata for all submission-based actions will be done in a later project. ### 👀 Preview steps <!-- Delete this section if behavior can't change. --> <!-- If behavior changes or merely may change, add a preview of a minimal happy path. --> Bug template: 1. ℹ️ have an account and a project that includes at least one audio question. 2. Add a submission to the project that includes an audio upload. 3. In Django Admin, add at least one language 4. Go to project > Data and open the the audio response for analysis 5. Add a transcript 6. Go to `api/v2/asset/<asset_uid>/history` 7. 🟢 There should be a new PH log with `action=modify-qa-data` and `submission: { submitted_by: <username> }` in the metadata, along with the usual 8. Add a translation 9. 🟢 Verify a new PH log has been added (same action and metadata) 10. Add a QA question and answer 11. 🟢 Verify a new PH log has been added (same action and metadata). Note there will also be new one with the `update-qa` action
- Loading branch information
Showing
7 changed files
with
153 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
68 changes: 68 additions & 0 deletions
68
kobo/apps/audit_log/migrations/0016_add_modify_qa_data_action.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
# Generated by Django 4.2.15 on 2025-02-05 16:08 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('audit_log', '0015_add_submission_audit_actions'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name='auditlog', | ||
name='action', | ||
field=models.CharField( | ||
choices=[ | ||
('add-media', 'Add Media'), | ||
('add-submission', 'Add Submission'), | ||
('allow-anonymous-submissions', 'Allow Anonymous Submissions'), | ||
('archive', 'Archive'), | ||
('auth', 'Auth'), | ||
('clone-permissions', 'Clone Permissions'), | ||
('connect-project', 'Connect Project'), | ||
('create', 'Create'), | ||
('delete', 'Delete'), | ||
('delete-media', 'Delete Media'), | ||
('delete-service', 'Delete Service'), | ||
('delete-submission', 'Delete Submission'), | ||
('deploy', 'Deploy'), | ||
('disable-sharing', 'Disable Sharing'), | ||
( | ||
'disallow-anonymous-submissions', | ||
'Disallow Anonymous Submissions', | ||
), | ||
('disconnect-project', 'Disconnect Project'), | ||
('enable-sharing', 'Enable Sharing'), | ||
('export', 'Export'), | ||
('in-trash', 'In Trash'), | ||
('modify-imported-fields', 'Modify Imported Fields'), | ||
('modify-service', 'Modify Service'), | ||
('modify-sharing', 'Modify Sharing'), | ||
('modify-submission', 'Modify Submission'), | ||
('modify-qa-data', 'Modify Qa Data'), | ||
('modify-user-permissions', 'Modify User Permissions'), | ||
('put-back', 'Put Back'), | ||
('redeploy', 'Redeploy'), | ||
('register-service', 'Register Service'), | ||
('remove', 'Remove'), | ||
('replace-form', 'Replace Form'), | ||
('share-form-publicly', 'Share Form Publicly'), | ||
('share-data-publicly', 'Share Data Publicly'), | ||
('unarchive', 'Unarchive'), | ||
('unshare-form-publicly', 'Unshare Form Publicly'), | ||
('unshare-data-publicly', 'Unshare Data Publicly'), | ||
('update', 'Update'), | ||
('update-content', 'Update Content'), | ||
('update-name', 'Update Name'), | ||
('update-settings', 'Update Settings'), | ||
('update-qa', 'Update Qa'), | ||
('transfer', 'Transfer'), | ||
], | ||
db_index=True, | ||
default='delete', | ||
max_length=30, | ||
), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters