Skip to content

Issue 2144: updated date parsing in template v3 upload logic#2145

Merged
rmroot merged 1 commit intodevelopfrom
issue-2144
Nov 12, 2025
Merged

Issue 2144: updated date parsing in template v3 upload logic#2145
rmroot merged 1 commit intodevelopfrom
issue-2144

Conversation

@rmroot
Copy link
Copy Markdown
Member

@rmroot rmroot commented Nov 11, 2025

connects #2144

This pull request improves how read dates are parsed during data import, ensuring consistent handling of different date formats. The main change is the introduction of a new getTemplateReadDate method in UploadDataV3Service, which standardizes date parsing across multiple import scenarios. Additionally, a minor fix was made in AccountReportsService to prevent errors when the selected report is null.

Date parsing improvements:

  • Added the getTemplateReadDate method to UploadDataV3Service to correctly parse dates in YYYY-MM-DD format and fallback to the default Date constructor for other formats. This change helps handle template dates more reliably.
  • Replaced all instances of direct new Date(readDateStr) calls with getTemplateReadDate(readDateStr) throughout UploadDataV3Service, ensuring consistent date parsing for utility meter and facility data imports. [1] [2] [3] [4] [5] [6] [7]

Error prevention:

  • Updated AccountReportsService to only validate and compare reports when a report is actually selected, preventing potential errors when the report is null.

@rmroot rmroot merged commit 219a343 into develop Nov 12, 2025
3 checks passed
@rmroot rmroot deleted the issue-2144 branch December 18, 2025 16:57
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.

1 participant