Skip to content

fix(strr-api): ignore unfiled applications in the registration sub-status filters (REGBACKLOG-391) - #1970

Open
severinbeauvais wants to merge 2 commits into
bcgov:feature-REGBACKLOG-391-v2from
severinbeauvais:REGBACKLOG-391-review-filter-drafts
Open

severinbeauvais wants to merge 2 commits into
bcgov:feature-REGBACKLOG-391-v2from
severinbeauvais:REGBACKLOG-391-review-filter-drafts

Conversation

@severinbeauvais

@severinbeauvais severinbeauvais commented Dec 3, 2026 •

Copy link
Copy Markdown
Collaborator

Issue:

Description of changes:

On the examiner dashboard, a registration that was provisionally approved and is still waiting for an examiner disappears from the Review filter as soon as the host saves a renewal draft. It doesn't show up under Review Renew either, because the application waiting for review is the registration application, not a renewal. So it drops out of every review queue until the renewal is submitted and processed.

This isn't caused by the renewal-window work: it's been on main since the search speed-up in #1918. It's fixed on the feature branch so it ships with the other REGBACKLOG-391 renewal fixes. There are two causes, both in the set-based subqueries #1918 added:

  • The "latest application" subquery counts drafts, so the draft becomes the application whose status the filter checks.
  • The "has a renewal" subquery counts drafts, so the registration is treated as renewed and excluded from Review. The older correlated check it replaced (_has_renewal_filed_condition) already left out DRAFT and PAYMENT_DUE.

The fix:

Notes for reviewers:

How this was tested:

  • A new parametrized test, test_search_registrations_review_ignores_unfiled_renewal, covers a provisionally approved registration followed by a renewal in DRAFT, then in PAYMENT_DUE. Both cases fail without the fix and pass with it.
  • New parametrized dashboard tests cover a newer renewal in DRAFT or PAYMENT_DUE (row shows Review) and a DRAFT renewal on a registration with a decider (row shows Approved). All three fail without the fix and pass with it.
  • The full examiner-web unit suite passed: 322 tests. eslint is clean.
  • The full strr-api suite passed on the feature branch: 865 passed, 6 skipped. black and isort are clean. pylint rates rental.py 10.00/10.

Copilot AI balanced review requested due to automatic review settings December 3, 2026 18:01

Copilot AI 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.

🟢 Approval recommended

No active review issues were identified for the change intended to preserve examiner dashboard results when renewals are unfiled.

No open issues 🎉

What changed in this PR

Keeps registrations in examiner dashboard filters when a host starts an unfiled renewal, correcting the search behavior introduced in #1918.

Changes:

  • Excludes DRAFT and PAYMENT_DUE applications from latest-application and renewal checks, including correlated fallbacks.
  • Adds regression coverage for both unfiled renewal statuses.
  • Bumps strr-api to 0.3.51.
File Description
strr-api/​tests/​unit/​resources/​test_registrations.py Tests that unfiled renewals preserve Review filter results.
strr-api/​src/​strr_api/​models/​rental.py Applies a shared filed-application condition across four query paths.
strr-api/​pyproject.toml Updates the API version to 0.3.51.

Review effort: Balanced

@severinbeauvais severinbeauvais self-assigned this Dec 3, 2026
…atus filters (REGBACKLOG-391)

A host saving a renewal draft took a provisionally approved registration out of the examiner's Review filter: the draft became the latest application, and it counted as a filed renewal. It never reached Review Renew either, because the application awaiting review isn't a renewal. The latest-application and renewal subqueries now leave out DRAFT and PAYMENT_DUE applications, as the older correlated renewal check already did.

Bumps strr-api to 0.3.51.
@severinbeauvais
severinbeauvais force-pushed the REGBACKLOG-391-review-filter-drafts branch from 4e9c0b6 to 35662c0 Compare December 3, 2026 19:17
@severinbeauvais
severinbeauvais changed the base branch from main to feature-REGBACKLOG-391-v2 December 3, 2026 19:17
@bcregistry-sre

Copy link
Copy Markdown
Collaborator

Temporary Url for review: https://strr-platform-dev--pr-1970-l037n3sn.web.app

@bcregistry-sre

Copy link
Copy Markdown
Collaborator

Temporary Url for review: https://strr-strata-hotel-dev--pr-1970-6sf8fgo0.web.app

@bcregistry-sre

Copy link
Copy Markdown
Collaborator

Temporary Url for review: https://strr-hosts-dev--pr-1970-62zbewur.web.app

@Jacky-Pham Jacky-Pham left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Can we keep Review on the Examiner row when a newer renewal is a draft or waiting for payment?

@severinbeauvais

Copy link
Copy Markdown
Collaborator Author

Can we keep Review on the Examiner row when a newer renewal is a draft or waiting for payment?

Yeah, that's a real gap in the PR, not just a nice-to-have. The row's sub-status is worked out in the examiner app from header.applications, which includes drafts and unpaid applications. So the registration came back in the Review filter but its row showed "-". The dashboard now leaves out DRAFT and PAYMENT_DUE applications when picking the latest application and when checking for a renewal, the same way the API filter does.

The row now shows Review, or Approved if an examiner has already decided. I've added tests for DRAFT and PAYMENT_DUE renewals. (in next commit)

…sub-status (REGBACKLOG-391)

The registration sub-status column picked the newest application in header.applications, which includes drafts and unpaid applications. A provisional registration with a draft or unpaid renewal was back in the Review filter but showed "-" on its row.

- getLatestRegistrationApplication and hasRenewalApplication now leave out DRAFT and PAYMENT_DUE applications, the same way the API's sub-status filters do.
- strr-examiner-web goes to 0.2.76.
@sonarqubecloud

sonarqubecloud Bot commented Dec 3, 2026

Copy link
Copy Markdown

Copilot AI 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.

🟢 Approval recommended

No active review issues block the renewal-queue filtering and dashboard-label changes.

No open issues 🎉

Review effort: Balanced

This branch has not been deployed

No deployments
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.

4 participants