Skip to content

fix(registry): show ID status column on group form; keep empty status for registry-added IDs (#1110)#297

Merged
emjay0921 merged 3 commits into
19.0from
fix/1110-group-id-status-column
Jul 10, 2026
Merged

fix(registry): show ID status column on group form; keep empty status for registry-added IDs (#1110)#297
emjay0921 merged 3 commits into
19.0from
fix/1110-group-id-status-column

Conversation

@emjay0921

Copy link
Copy Markdown
Contributor

Why is this change needed?

On the group form the registrant IDs list gave no way to tell a soft-removed (invalid) ID apart from a valid one. There was also inconsistency in how the ID status was set: IDs added directly through the registry UI were being defaulted in a way that diverged from the ID-document change-request flow.

How was the change implemented?

  • Added an ID Status column (Valid/Invalid badge) to the IDs list on the group form so a soft-removed ID is visually distinguishable.
  • IDs added directly via the registry UI now keep an empty status; Valid/Invalid is set only by the ID-document change-request flow, per the #1110 decision to stay consistent across the system.
  • models/reg_id.py, views/individual_views.xml updated accordingly.

New unit tests

Added spp_registry/tests/test_reg_id.py cases covering the empty-status default for registry-added IDs and the status behaviour.

Unit tests executed by the author

Module test suite (spp_registry) passes locally.

How to test manually

  1. Install spp_registry.
  2. Open a group form and add an ID directly through the UI — confirm its Status stays empty.
  3. Confirm the IDs list on the group form shows a Status column with Valid/Invalid badges.
  4. Soft-remove an ID via the ID-document change request flow and confirm it shows as Invalid.

Related links

OP#1110

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

Copy link
Copy Markdown

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 updates the spp_registry module to display the ID status column (as a badge) and description on the individual form, ensuring soft-removed IDs are distinguishable. It also adds a help tooltip to the status field, bumps the module version to 19.0.2.1.3, and introduces corresponding unit tests. Feedback on the changes suggests removing internal ticket references (e.g., OP#1110) from the user-facing help text of the status field to keep tooltips clean and translation-friendly.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment on lines +37 to +45
status = fields.Selection(
[("invalid", "Invalid"), ("valid", "Valid")],
help=(
"Validity of this ID. Left empty for IDs added directly via the "
"registry UI (kept consistent across the system, OP#1110); set by "
"the ID-document change request flow — Valid on add, Invalid on "
"soft-remove."
),
)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

The help attribute is user-facing and displayed as a tooltip in the UI. It is best practice to avoid including internal ticket references (such as OP#1110) or internal system implementation details in user-facing strings, as they are not meaningful to end-users and clutter translation files. Let's clean up the help text to be more concise and user-friendly.

    status = fields.Selection(
        [("invalid", "Invalid"), ("valid", "Valid")],
        help=(
            "Validity of this ID. Left empty for IDs added directly via the "
            "registry UI; set by the ID-document change request flow — "
            "Valid on add, Invalid on soft-remove."
        ),
    )

@codecov

codecov Bot commented Jul 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 71.59%. Comparing base (fd1eb1b) to head (3583c8a).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             19.0     #297      +/-   ##
==========================================
+ Coverage   68.23%   71.59%   +3.36%     
==========================================
  Files         157      418     +261     
  Lines       13420    26774   +13354     
==========================================
+ Hits         9157    19170   +10013     
- Misses       4263     7604    +3341     
Flag Coverage Δ
spp_analytics 93.13% <ø> (?)
spp_api_v2 79.78% <ø> (?)
spp_api_v2_change_request 66.41% <ø> (?)
spp_api_v2_cycles 70.65% <ø> (?)
spp_api_v2_data 77.43% <ø> (?)
spp_api_v2_entitlements 69.96% <ø> (?)
spp_api_v2_gis 71.52% <ø> (?)
spp_api_v2_products 65.66% <ø> (?)
spp_api_v2_programs 92.03% <ø> (?)
spp_api_v2_service_points 70.54% <ø> (?)
spp_api_v2_simulation 71.12% <ø> (?)
spp_api_v2_vocabulary 57.26% <ø> (?)
spp_approval 50.29% <ø> (?)
spp_area 80.07% <ø> (?)
spp_area_hdx 81.43% <ø> (?)
spp_audit 72.04% <ø> (?)
spp_base_common 90.26% <ø> (ø)
spp_programs 65.27% <ø> (ø)
spp_registry 86.83% <100.00%> (ø)
spp_security 66.66% <ø> (ø)

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

Files with missing lines Coverage Δ
spp_registry/__manifest__.py 0.00% <ø> (ø)
spp_registry/models/reg_id.py 95.50% <100.00%> (ø)

... and 261 files with indirect coverage changes

🚀 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.

@emjay0921 emjay0921 merged commit 84fe095 into 19.0 Jul 10, 2026
35 checks passed
@emjay0921 emjay0921 deleted the fix/1110-group-id-status-column branch July 10, 2026 01:48
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