Skip to content

Issue 1214 - backward compatibility logic added, years displayed in dropdown changed#2117

Merged
rmroot merged 2 commits intodevelopfrom
issue-1214c
Oct 22, 2025
Merged

Issue 1214 - backward compatibility logic added, years displayed in dropdown changed#2117
rmroot merged 2 commits intodevelopfrom
issue-1214c

Conversation

@jamlokim
Copy link
Copy Markdown
Contributor

connects #1214

This pull request refactors the year selection logic in the RegressionModelMenuComponent and introduces a safeguard for regression model start month initialization in the database update service. The main focus is on removing the dependency on CalanderizationService for year options and calculating them directly from facility meter data, along with ensuring a default value for regression model start month.

Refactoring year selection logic:

  • Removed the import and usage of CalanderizationService from regression-model-menu.component.ts, and replaced its year options logic with a new method setYears that calculates year options based on the earliest and latest meter readings in facilityMeterData.
  • Added a new property facilityMeterData to store meter data, which is used in the new setYears method.

Database update safeguard:

  • In update-db-entry.service.ts, added logic to set a default value (0) for regressionModelStartMonth in regression analysis groups where the value is undefined and the model is not user-defined, ensuring consistent initialization.

@jamlokim jamlokim requested a review from rmroot October 21, 2025 18:52
@rmroot rmroot merged commit 159a299 into develop Oct 22, 2025
3 checks passed
@jamlokim jamlokim deleted the issue-1214c branch January 12, 2026 16:09
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.

2 participants