bcgov / bcgov/range-web

Orphan agreement holder records in ref_client + client_agreement cause duplicate RAN's on homepage

Open
#833 0 comments 0 reactions 0 assignees View on GitHub
Bug
Dominant language
TypeScript
Stars
9
Forks
11
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**
In the rare event FTA doesn't send us a P or C for a given ref_client record, these are orphaned and result in extra primary agreement holder records in client_agreement, which then manifest themselves as duplicate RAN's, or in some rare cases RANs that show up for other range officers in other districts (this one was a loc_code of 3 )

Issue that's been there since original release to production, but only rearing it's head with more people using the site.

**Expected Behaviour**
There should never be a duplicate RAN on the home page, nor should a RAN show up for other staff.

**Actual Behaviour**
Duplicate RANS for records with orphan primary and RANS visible for the wrong people with loc_code's of 3.

**To Reproduce**
Put another ref_client record for the same ran, loc code's of 1 and 3 and view the home page.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.