feat: show Survey ID on the Correct Data page and in the Correction Log - #264
Open
iabaako wants to merge 3 commits into
Open
feat: show Survey ID on the Correct Data page and in the Correction Log#264iabaako wants to merge 3 commits into
iabaako wants to merge 3 commits into
Conversation
|
iabaako
marked this pull request as ready for review
August 7, 2026 15:47
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Pull Request Summary 🚀
What does this PR do? 📝
tests/views/test_correction_view.pycoverage from 37.58% to 84.71% (project gate is 80%).Why is this change needed? 🤔
Reviewers correcting data need to see the human-readable Survey ID alongside the internal KEY, both while making a correction and when reviewing past corrections in the log. The "ID" column already existed in the log's schema but was never populated, so it rendered blank.
How was this implemented? 🛠️
TabConfiggained asurvey_id: str | Nonefield, sourced fromload_tab_config's page config.render_add_correction_formlooks up and displays the Survey ID (viaget_current_value) once a KEY is selected, and threads it through_render_apply_button/_handle_apply_correction.CorrectionProcessor.apply_correctiongained asurvey_id_valueparameter, passed through toadd_correction_entryascurrent_id(previously hardcoded toNone)._build_correction_log_displayrenames the "ID" column to "Survey ID" for display, keeping the underlying persisted column name unchanged for backward compatibility.correction_view.pyfunctions, including aTestMainclass for the page'smain()entry point, replacing several tests that only duplicated logic inline rather than exercising the real functions.How to test or reproduce ? 🧪
uv run python -m pytest tests/views/test_correction_view.py --cov=datasure.views.correction_view --cov-report=term-missing -qto confirm ≥80% coverage.Screenshots (if applicable) 📷
Checklist ✅
🤖 Generated with Claude Code