[PR #3723] [MERGED] Fix issue with Monthly Spending report not properly averaging previous three months #46842

Closed
opened 2026-04-26 08:52:51 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/actualbudget/actual/pull/3723
Author: @joel-rich
Created: 10/24/2024
Status: Merged
Merged: 10/25/2024
Merged by: @carkom

Base: masterHead: spending-report


📝 Commits (2)

  • cd39134 Fix issue with Monthly Spending report not properly summing previous three months
  • ec22e33 release notes

📊 Changes

2 files changed (+11 additions, -1 deletions)

View changed files

📝 packages/desktop-client/src/components/reports/spreadsheets/spending-spreadsheet.ts (+5 -1)
upcoming-release-notes/3723.md (+6 -0)

📄 Description

I noticed the Monthly Spending report wasn't properly averaging the previous three months when "Average" was selected. In my tests only the previous two months were averaged.

Issue was that not all date variables were in the same format.

month.month was YYYY-MM
startDate was YYYY-MM-DD

This caused issues when doing the string compare of month.month >= startDate

Changed it to call the month helper function to format startDate correctly for the comparison


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/actualbudget/actual/pull/3723 **Author:** [@joel-rich](https://github.com/joel-rich) **Created:** 10/24/2024 **Status:** ✅ Merged **Merged:** 10/25/2024 **Merged by:** [@carkom](https://github.com/carkom) **Base:** `master` ← **Head:** `spending-report` --- ### 📝 Commits (2) - [`cd39134`](https://github.com/actualbudget/actual/commit/cd39134d0dc36a2686e4263b961a87718198e82b) Fix issue with Monthly Spending report not properly summing previous three months - [`ec22e33`](https://github.com/actualbudget/actual/commit/ec22e33871d24df0261d4facc7825ca9d6c00845) release notes ### 📊 Changes **2 files changed** (+11 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `packages/desktop-client/src/components/reports/spreadsheets/spending-spreadsheet.ts` (+5 -1) ➕ `upcoming-release-notes/3723.md` (+6 -0) </details> ### 📄 Description I noticed the Monthly Spending report wasn't properly averaging the previous three months when "Average" was selected. In my tests only the previous two months were averaged. Issue was that not all date variables were in the same format. `month.month` was `YYYY-MM` `startDate` was `YYYY-MM-DD` This caused issues when doing the string compare of `month.month >= startDate` Changed it to call the month helper function to format startDate correctly for the comparison --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-26 08:52:51 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/actual#46842