Skip to content

fix(registry,programs): restore readonly=disabled and editable lists broken by lint#59

Merged
gonzalesedwin1123 merged 2 commits into19.0from
fix/restore-readonly-disabled-fields
Feb 27, 2026
Merged

fix(registry,programs): restore readonly=disabled and editable lists broken by lint#59
gonzalesedwin1123 merged 2 commits into19.0from
fix/restore-readonly-disabled-fields

Conversation

@emjay0921
Copy link
Contributor

Why is this change needed?

Commit 7bd3831 (lint migration) incorrectly changed readonly="disabled" to readonly="1" and removed editable attributes from list views. This made membership, IDs, and relationship fields read-only — users can no longer add members, IDs, or relationships directly from the registrant form.

How was the change implemented?

Restored readonly="disabled" and editable="top" / editable="bottom" on all affected fields across 5 files:

spp_registry:

  • group_membership_views.xmlgroup_membership_ids
  • individual_membership_views.xmlindividual_membership_ids
  • individual_views.xmlreg_ids, related_1_ids, related_2_ids (both Individual and Group forms)

spp_programs:

  • program_membership_view.xmlreg_ids, related_1_ids, individual_membership_ids
  • duplicate_view.xmlbeneficiary_ids

New unit tests

N/A — view-only fix, no logic changes.

Unit tests executed by the author

N/A

How to test manually

  1. Open a Group registrant form → Participation tab → verify "Group Members" list is editable (can add/remove rows)
  2. Open an Individual registrant form → Participation tab → verify "Group Membership" list is editable
  3. Check Identity tab → IDs and Relationships lists should be editable inline
  4. In Program Membership form → IDs, Relationships, and Groups tabs should be editable

Related links

Lint commit that caused the regression: 7bd3831

…s broken by lint

The lint commit 7bd3831 incorrectly changed readonly="disabled" to
readonly="1" and removed editable attributes from list views, making
membership, IDs, and relationship fields read-only in the UI.

Affected views:
- spp_registry: group/individual membership, reg_ids, relationships
- spp_programs: program membership reg_ids, relationships, duplicates
@gemini-code-assist
Copy link

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request addresses a critical regression that rendered several key list views uneditable within the application's forms. By restoring the correct readonly and editable attributes in the XML view definitions, it re-enables users to manage memberships, IDs, and relationships directly from the registrant and program membership forms, ensuring essential data entry functionality is preserved.

Highlights

  • Restored Editability: Re-enabled editing functionality for various list views, including membership, IDs, and relationships, across spp_registry and spp_programs modules.
  • Attribute Correction: Corrected readonly="1" attributes to readonly="disabled" and re-introduced editable="top" or editable="bottom" attributes in affected XML view definitions.
  • Regression Fix: Resolved a regression introduced by a previous lint migration (7bd3831) that inadvertently made these critical fields read-only.
Changelog
  • spp_programs/views/duplicate_view.xml
    • Removed readonly="1" attribute from the beneficiary_ids field.
    • Added editable="bottom" attribute to the list element for beneficiary_ids.
  • spp_programs/views/program_membership_view.xml
    • Removed readonly="1" attribute from the reg_ids field.
    • Added editable="bottom" attribute to the list element for reg_ids.
    • Removed readonly="1" attribute from the related_1_ids field.
    • Added editable="bottom" attribute to the list element for related_1_ids.
    • Removed readonly="1" attribute from the individual_membership_ids field.
    • Added editable="bottom" attribute to the list element for individual_membership_ids.
  • spp_registry/views/group_membership_views.xml
    • Changed readonly="1" to readonly="disabled" for the group_membership_ids field.
    • Added editable="top" attribute to the list element for group_membership_ids.
  • spp_registry/views/individual_membership_views.xml
    • Changed readonly="1" to readonly="disabled" for the individual_membership_ids field.
    • Added editable="top" attribute to the list element for individual_membership_ids.
  • spp_registry/views/individual_views.xml
    • Changed readonly="1" to readonly="disabled" for the reg_ids field.
    • Added editable="bottom" attribute to the list element for reg_ids.
    • Changed readonly="1" to readonly="disabled" for the related_1_ids field.
    • Added editable="bottom" attribute to the list element for related_1_ids.
    • Changed readonly="1" to readonly="disabled" for the related_2_ids field.
    • Added editable="bottom" attribute to the list element for related_2_ids.
    • Changed readonly="1" to readonly="disabled" for the reg_ids field within the group IDs section.
    • Added editable="bottom" attribute to the list element for reg_ids within the group IDs section.
    • Changed readonly="1" to readonly="disabled" for the related_1_ids field within the group IDs section.
    • Added editable="bottom" attribute to the list element for related_1_ids within the group IDs section.
    • Changed readonly="1" to readonly="disabled" for the related_2_ids field within the group IDs section.
    • Added editable="bottom" attribute to the list element for related_2_ids within the group IDs section.
Activity
  • Identified a regression where readonly="1" was incorrectly applied and editable attributes were removed during a lint migration (7bd3831).
  • Implemented changes to restore readonly="disabled" and editable="top" / editable="bottom" attributes in affected XML view files.
  • Provided detailed manual testing steps across various forms (Group registrant, Individual registrant, Program Membership) to verify the fix.
  • Confirmed that no new unit tests were required as the changes are view-only, with no logic modifications.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Add group_membership_ids, individual_membership_ids, reg_ids,
related_1_ids, related_2_ids, and beneficiary_ids to the
allow_editable_o2m list so the ui.large_o2m_editable lint rule
does not flag them in future runs.
Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request fixes a regression introduced by a linting tool, which made several list views read-only. The changes correctly restore the editable attributes on lists and adjust the readonly properties on fields, allowing users to again edit memberships, IDs, and relationships. The changes are consistent with the description and appear to solve the issue. I've added a few minor suggestions to improve XML formatting consistency across the modified files for better long-term maintainability.

Comment on lines +50 to +51
<field name="beneficiary_ids" nolabel="1" colspan="2">
<list delete="0" editable="bottom">

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

For consistency with other view files in this pull request (e.g., spp_registry/views/individual_views.xml) and for better readability, consider placing attributes of the <field> and <list> tags on separate lines.

Suggested change
<field name="beneficiary_ids" nolabel="1" colspan="2">
<list delete="0" editable="bottom">
<field
name="beneficiary_ids"
nolabel="1"
colspan="2"
>
<list
delete="0"
editable="bottom"
>

<page string="IDs" name="ids">
<field name="reg_ids" nolabel="1" colspan="2" readonly="1">
<list>
<field name="reg_ids" nolabel="1" colspan="2">

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

For consistency with other view files in this PR and for better readability, consider placing attributes of the <field> tag on separate lines.

                            <field
                                name="reg_ids"
                                nolabel="1"
                                colspan="2"
                            >

readonly="1"
>
<list>
<field name="related_1_ids" nolabel="1" colspan="2">

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

For consistency and readability, consider placing attributes of the <field> tag on separate lines.

                                <field
                                    name="related_1_ids"
                                    nolabel="1"
                                    colspan="2"
                                >

Comment on lines +17 to +18
<field name="group_membership_ids" readonly="disabled" nolabel="1">
<list editable="top" default_order='status asc,ended_date asc'>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

For consistency with other view files in this PR (e.g., spp_registry/views/individual_views.xml) and for better readability, consider placing attributes of the <field> and <list> tags on separate lines.

Suggested change
<field name="group_membership_ids" readonly="disabled" nolabel="1">
<list editable="top" default_order='status asc,ended_date asc'>
<field
name="group_membership_ids"
readonly="disabled"
nolabel="1"
>
<list
editable="top"
default_order="status asc,ended_date asc"
>

<separator string="Group Membership" />
<field name="individual_membership_ids" readonly="1" nolabel="1">
<list>
<field name="individual_membership_ids" readonly="disabled" nolabel="1">

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

For consistency and readability, consider placing attributes of the <field> tag on separate lines.

                <field
                    name="individual_membership_ids"
                    readonly="disabled"
                    nolabel="1"
                >

@gonzalesedwin1123 gonzalesedwin1123 merged commit a72ada0 into 19.0 Feb 27, 2026
11 of 12 checks passed
@gonzalesedwin1123 gonzalesedwin1123 deleted the fix/restore-readonly-disabled-fields branch February 27, 2026 09:25
@codecov
Copy link

codecov bot commented Feb 27, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 68.97%. Comparing base (2a25b61) to head (f8c969e).
⚠️ Report is 3 commits behind head on 19.0.

Additional details and impacted files
@@            Coverage Diff             @@
##             19.0      #59      +/-   ##
==========================================
- Coverage   72.02%   68.97%   -3.05%     
==========================================
  Files          65      400     +335     
  Lines        6148    32081   +25933     
==========================================
+ Hits         4428    22128   +17700     
- Misses       1720     9953    +8233     
Flag Coverage Δ
spp_aggregation 78.01% <ø> (?)
spp_api_v2 89.72% <ø> (?)
spp_api_v2_change_request 73.97% <ø> (?)
spp_api_v2_cycles 65.45% <ø> (?)
spp_api_v2_data 48.67% <ø> (?)
spp_api_v2_entitlements 68.43% <ø> (?)
spp_api_v2_products 64.39% <ø> (?)
spp_api_v2_service_points 63.12% <ø> (?)
spp_api_v2_vocabulary 43.70% <ø> (?)
spp_approval 43.33% <ø> (?)
spp_area 85.75% <ø> (?)
spp_area_hdx 88.33% <ø> (?)
spp_base_common 92.81% <ø> (?)
spp_dci_demo ?
spp_demo ?
spp_grm_demo ?
spp_mis_demo_v2 ?
spp_programs 49.56% <ø> (?)
spp_security 51.08% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants