bcgov / bcgov/entity

Pending Staff Review NRs showing when the search parameter is set to Draft.

Open
#27,656 5 comments 0 reactions 0 assignees View on GitHub
bug Entities Team Priority3 UX Assurance
Dominant language
JavaScript
Stars
23
Forks
62
Avg merge
24m
Merged PRs (30d)
1

Description

**Describe the bug in the current situation**
In the Affiliations call, when the search parameter is set to Draft, the NRs with pending staff review show up, which are not actually drafts but their "StateCd: draft" object is Draft.

Steps to reproduce the behavior:
1. Go to 'https://auth-api-test-129641755850.northamerica-northeast1.run.app/api/v1/orgs/596/affiliations/search?status=DRAFT'
2. Execute the request
3. In the JSON Response, observe that all the NRs with "Pending Staff Reviews" show up

**Screenshots/ Visual Reference/ Source**
Screen Shot 2025-05-08 at 2.45.56 PM.png

**Questions**
Which states should we allow the users to look at?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at the Affiliations search endpoint shown in the reproduction URL and trace how the status=DRAFT filter maps returned NRs to their states. Resolve which states should be visible with the maintainers, then reproduce the response and add or adjust coverage so pending staff reviews are excluded from Draft results while genuine drafts remain.

Written by the indexing model from the issue text.

Assessment

Tech stack
flask, python
Domain
api, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.