revert(change_request): restore old Add Member (#871) + Change HoH (#873) CR flows - #382
Merged
Conversation
…873) CR flows The #242 redesign removed the create-a-new-individual Add Member fields and switched Change Head of Household to a per-member role table, which broke downstream modules that extend the old flows (ParseError on the removed relationship_id / new_head_id view fields; missing model fields on apply). Restore the pre-#242 add_member and change_hoh detail models, strategies, views, and tests, and adapt the MIS demo generator + e2e workflow tests to the restored contracts. Create Group (#876), Remove Member (#872), and Split Household (#877) are untouched, and the per-reason Required-Documents feature that landed alongside #873 is retained. - spp_change_request_v2 19.0.3.0.0 -> 19.0.3.1.0 - spp_mis_demo_v2 19.0.2.1.3 -> 19.0.2.1.4
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
…+compute methods Lift codecov patch coverage over the 70% target for the #871/#873 revert by exercising the restored detail methods the strategy tests don't touch: _onchange_names (add_member, all name branches) and _compute_current_head / _compute_available_individuals / _onchange_new_head_id (change_hoh).
gonzalesedwin1123
approved these changes
Jul 30, 2026
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.
Why is this change needed?
The #242 redesign of the group/membership Change Request flows made two breaking changes that downstream modules extending the old flows can no longer load or apply against:
created_individual_id,given_name,family_name,birthdate,gender_id,relationship_id) in favour of anindividual_id"select existing member" picker.current_head_id/new_head_idfields with a per-member role table.A downstream module that inherits
spp.cr.detail.add_member/spp.cr.detail.change_hohand their form views fails to install (ParseError: <field name="relationship_id"> … cannot be located, then the same fornew_head_id) and breaks at apply time on the removed model fields.This restores the pre-#242 Add Member and Change HoH flows so those consumers work again, while keeping the rest of #242 intact.
How was the change implemented?
details/add_member.py,strategies/add_member.py,views/detail_add_member_views.xml,tests/test_add_member_strategy.py,details/change_hoh.py,strategies/change_hoh.py,views/detail_change_hoh_views.xml,tests/test_change_hoh_strategy.py.security/ir.model.access.csv— removed the 4spp.cr.detail.change_hoh.memberACL rows (that model no longer exists); kept thespp.cr.type.reason.documentrows.tests/test_e2e_workflows.py— Add Member / Change HoH steps use the restored contracts (create-new individual +new_head_id); Create Group / Remove Member / Split Household steps unchanged.spp_mis_demo_v2/models/mis_demo_generator.py— Add Member demo builds a new individual again; Change HoH demo setsnew_head_id; removed the per-member-role helper.change_request.py_get_effective_required_document_ids,change_request_type.pyreason_document_ids, its view + ACLs).spp_dci_demoAdd Member birth-verification extension is not reinstated here.spp_change_request_v219.0.3.0.0 → 19.0.3.1.0,spp_mis_demo_v219.0.2.1.3 → 19.0.2.1.4.New unit tests
None added — this restores the pre-#242 test suites for both flows (
test_add_member_strategy.py,test_change_hoh_strategy.py) and the e2e workflow steps.Unit tests executed by the author
spp_change_request_v2full suite (Docker,-ifresh DB): 0 failed, 0 error(s) of 323 tests.How to test manually
spp_change_request_v2andspp_mis_demo_v2— both load clean.current_head_id/new_head_id, apply promotes the new head.Related links
Reverts the Add Member (#871) and Change HoH (#873) portions of #242.