[PR #990] [CLOSED] [Bugfix] Goal Templates schedules: Add break condition to while loop #3451

Closed
opened 2026-02-28 20:41:51 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/actualbudget/actual/pull/990
Author: @shall0pass
Created: 5/3/2023
Status: Closed

Base: masterHead: schedulesStuckLoop


📝 Commits (4)

📊 Changes

2 files changed (+9 additions, -0 deletions)

View changed files

📝 packages/loot-core/src/server/budget/goaltemplates.ts (+3 -0)
upcoming-release-notes/990.md (+6 -0)

📄 Description

There is a while loop that can get stuck in an endless loop condition. I don't totally understand why the line

next_date = new Date(next_date_string);

doesn't output the expected result. So I set up an intermediate variable to create a date then applied the same operation again. If the two values are the same, I break the loop.

Issue: https://github.com/actualbudget/actual/issues/983


🔄 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/990 **Author:** [@shall0pass](https://github.com/shall0pass) **Created:** 5/3/2023 **Status:** ❌ Closed **Base:** `master` ← **Head:** `schedulesStuckLoop` --- ### 📝 Commits (4) - [`ae9cc92`](https://github.com/actualbudget/actual/commit/ae9cc9236c98affe1ae4f288af3d469ba4e509a7) add break condition for while loop - [`5c7aa37`](https://github.com/actualbudget/actual/commit/5c7aa373ec6893f79a34e9a88fda0c5288715809) release notes - [`dff151d`](https://github.com/actualbudget/actual/commit/dff151d10739dfa9c869d809dd8b5a96e8393250) Update upcoming-release-notes/990.md - [`c72bba4`](https://github.com/actualbudget/actual/commit/c72bba48e3e7d1b2f75027a15075e6cc039452ad) different approach ### 📊 Changes **2 files changed** (+9 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `packages/loot-core/src/server/budget/goaltemplates.ts` (+3 -0) ➕ `upcoming-release-notes/990.md` (+6 -0) </details> ### 📄 Description There is a while loop that can get stuck in an endless loop condition. I don't totally understand why the line `next_date = new Date(next_date_string);` doesn't output the expected result. So I set up an intermediate variable to create a date then applied the same operation again. If the two values are the same, I break the loop. Issue: https://github.com/actualbudget/actual/issues/983 --- <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-02-28 20:41:51 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/actual#3451