Scheduled transactions are broken for "Next Payout"

Bug #2065740 reported by Mike Severin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
HomeBank
Fix Released
Low
Maxime DOYEN

Bug Description

INFO
Home Bank Version: 5.8
OS Type: Ubuntu 22.04.4
GTK Version: GTK+ 3.24.33

WHERE
Transactions - Set scheduler -> Scheduled transactions -> Next Payout (Automatic post)

WHAT
Starting with version 5.8 my scheduled transactions are posted too early. I have it set up so that all transactions for a month are posted on the first of each month but today (May 15th) the scheduled transactions for June get posted. After further inspection I noticed that the dialog to configure automatic posting of scheduled transaction is broken. When increasing the month counter the date preview for the next scheduled posting does not properly increase alongside. It's easier to understand if you watch the short 15 second video I attached. It's possible that the early posting of scheduled transactions and the incorrect settings dialog are two separate issues since the preview shows 01.06.2024 for the next automatic post but it still posts them during May.

EXPECTATION
If the date for the next automatic posting of scheduled transactions is set to the 01.06.2024 (or rather the first of each month) next months transactions should not be posted early in the middle of the May (the current month).

Revision history for this message
Mike Severin (mikeseverin) wrote :
Revision history for this message
Mike Severin (mikeseverin) wrote :

I downgraded to 5.5.2-1 (which is way lower than I was before but is the version available for 22.04 in the Ubuntu repo) to workaround the bug for the time being. Please see attached my "scheduled transactions" settings of that old version. Maybe it's useful. Unfortunately I cannot verify if this actually was my old setting or if upgrading to 5.8 and then downgrading to 5.5.2-1 has somehow changed it.

Revision history for this message
Maxime DOYEN (mdoyen) wrote (last edit ):

not related to 5.8, prior release behave the same (5.7 and 5.6)
except if side effect of #2064839 post of today due date txn do not happen

you should be able to find a .deb more recent, 22.04 derives from debian 12 bookworm
there is a 5.6.2 package https://packages.debian.org/bookworm/gnome/

note for next step: feature origin in 5.6:
https://bugs.launchpad.net/homebank/+bug/1869352

summary: - Scheduled transactions are broken for "Next Payout" in 5.8
+ Scheduled transactions are broken for "Next Payout"
Revision history for this message
Maxime DOYEN (mdoyen) wrote :

mike,

the addition of x months broken the maximum post date computing for sure if month > 1

but so far, if your config is next payout 1 of 1 month
maximum post date is june 1st
as so any txn with next date < will be posted
if they get posted on 15th, the next date was < june 1st

few question:
- what was the previous version you were using ?
- what was the next date of scheduled txn when the post occurs ?

Changed in homebank:
status: New → Incomplete
Maxime DOYEN (mdoyen)
Changed in homebank:
assignee: nobody → Maxime DOYEN (mdoyen)
importance: Undecided → Low
milestone: none → 5.8.1
Revision history for this message
Mike Severin (mikeseverin) wrote :

Hi Maxime!

Used Version: I don't know, however I am using your ppa:mdoyen/homebank for Jammy Jellyfish. So the version you published there before 5.8 was the version I used and it worked as intended.

Next date of TXs: (Had to reinstall 5.8 and set the due date to "1 of each 1 month" again.) The TXs scheduled for 01.01.2024 get posted. The TXs with later dates, eg. 25.06.2024 do not get posted.

Do you say it is intended behavior that with "1 of each 1 month" all transactions on the first of each month get posted during the prior month? So if scheduled post is 01.JUNE.2024 it is correct to be posted during any day of MAY? If so, something must have changed with 5.8. Before version 5.8 Homebank posted all TXs for each month on the 1st day of the month and I didn't change my scheduling before the upgrade. So TXs scheduled for 01.06 and 25.06 and 30.06 were all posted on the 01.06.

Revision history for this message
Maxime DOYEN (mdoyen) wrote :

thx for additionnal info,

with 5.8 I just fix/changed this
#2064839 post of today due date txn do not happen

> will do some more test

Revision history for this message
Mike Severin (mikeseverin) wrote :

I did experience the behavior described in #2064839 as well starting at some point. Can't tell you if it happened every time or only sometimes and when exactly it started. For some reason I didn't perceive it as a bug and thus didn't report it. Probably because I could easily mitigate it by just marking the highlighted transactions and clicking "post". But that's just fyi so you get the full picture.

Maxime DOYEN (mdoyen)
Changed in homebank:
status: Incomplete → In Progress
Revision history for this message
Maxime DOYEN (mdoyen) wrote (last edit ):

To summarize here:

1) why your 1st june get posted too early
the fix of '#2064839 post of today due date txn do not happen' is the cause
when you openend your hb file with 5.8, maxpostdate was 1st june
but the fix change the behavior prior v5.8 from post until < maxpostdate to until <= maxpostdate
> so your txn were posted too early
> needs a fix

2) the compute of maxpostdate may be wrong if X each X month is > 1
I need to review https://bugs.launchpad.net/homebank/+bug/1869352

Changed in homebank:
importance: Low → Medium
Maxime DOYEN (mdoyen)
Changed in homebank:
status: In Progress → Fix Committed
importance: Medium → Low
Maxime DOYEN (mdoyen)
Changed in homebank:
status: Fix Committed → Fix Released
Revision history for this message
Mike Severin (mikeseverin) wrote :

Hello Maxime!

First of all thank you for the bug fix. With 5.8.1 the transactions are no longer posted early since it always selects the last day of the month.

The Scheduled transactions preview however still acts funky. See the attached video.

Revision history for this message
Maxime DOYEN (mdoyen) wrote :

Hey,

No the math is correct, every X month means you start a specific month, and it is January

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.