bcgov / bcgov/wps

HFI Calculator: Station order sometimes doesn't apply

Open
#4,418 0 comments 0 reactions 0 assignees View on GitHub
4Refinement Bug
Dominant language
Python
Stars
65
Forks
11
Avg merge
21h 25m
Merged PRs (30d)
70

Description

**Actual Behaviour**

Station ordering should respect the `order_of_appearance_in_planning_area_list`, and be ordering according to that value. Sometimes this doesn't work.

**Steps To Reproduce**

1. Change order of a station in database
2. Clear Redis cache to avoid any cached orderings
3. Clear `hfi_ready` records to avoid any stale state, if any
4. Possibly see wrong ordering

**Screenshots**

If applicable, add screenshots to help explain your problem.

**Expected Behaviour**

Starting from 1, order of stations should correspond to its `order_of_appearance_in_planning_area_list`.

Contributor guide

Open the contributing guide

Research direction

No file, test, or entry point is named. Start by reproducing the HFI Calculator ordering after changing a station's database order, clearing Redis and hfi_ready records, then trace the station-ordering path; done means stations consistently appear in order starting from 1 according to order_of_appearance_in_planning_area_list.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, redis
Domain
backend, databases
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 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.