bcgov / bcgov/lcfs

LCFS - FSE duplicate serial number validation update

Open
#4,157 0 comments 0 reactions 0 assignees View on GitHub
FSE Medium Task
Dominant language
Python
Stars
6
Forks
6
Avg merge
2d 7h
Merged PRs (30d)
87

Description

**Describe the task**
Enhance the FSE duplicate serial number validation to include **Charging Site address** as an additional check.

Currently, duplicate Serial numbers are allowed if associated with different Charging Sites (based on Site name). Update this logic so that even if Site names differ, duplicate Serial numbers are **not allowed** when the **Site address is the same**, preventing duplicate site entries under different names.

This validation must be applied in both the **inline FSE input form** and the **Excel upload process**.

**Purpose**
Prevents data integrity issues caused by users accidentally creating duplicate Charging Sites with different names but the same address, ensuring Serial numbers are not incorrectly duplicated across what is effectively the same location.

**Acceptance Criteria**
- [ ] Duplicate Serial numbers are allowed when associated with different Charging Sites **with different addresses**.
- [ ] Duplicate Serial numbers are **blocked** when associated with Charging Sites that share the same address, even if Site names differ.
- [ ] Validation is enforced in the **inline FSE input form**.
- [ ] Validation is enforced in the **Excel upload process**.
- [ ] Clear validation error message is displayed when duplicates are detected based on matching address.
- [ ] Existing valid scenarios (true different sites with different addresses) are not impacted.

**Additional context**
- This builds on recent changes allowing duplicate Serial numbers across different sites.
- Address comparison should be robust enough to handle formatting variations if applicable.
- Ensure consistency between frontend and backend validation logic.

Contributor guide

Open the contributing guide

Research direction

Trace the existing duplicate Serial number validation in the inline FSE input form and Excel upload process, then identify the shared frontend and backend entry points. Compare Charging Site addresses alongside site names, cover formatting variations if supported, and verify that matching-address duplicates are blocked while different-address sites remain allowed with a clear error message.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
full-stack
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.