[Bug]: When adding more than one transaction, the account name doesn't get resest. #2265

Open
opened 2026-02-28 20:08:26 -06:00 by GiteaMirror · 1 comment
Owner

Originally created by @RahulShagri on GitHub (Jul 6, 2025).

Verified issue does not already exist?

  • I have searched and found no existing issue

What happened?

A recent bug fix fixed the notes not being erased after entering a new transaction from the Actual Budget 'New Transaction' Widget app on Android. However, the account name still doesn't get erased. This not only happens when using "New Transaction" widget, but also when entering multiple new transactions using the App itself.

How can we reproduce the issue?

  1. Open Actual Budget on Android
  2. Add a new transaction using the "+" icon at the bottom of the screen
  3. Go back and hit the "+" icon again. The account name that was used in the previous transaction has not reset

Where are you hosting Actual?

Pikapods

What browsers are you seeing the problem on?

Chrome

Operating System

Mobile Device

Originally created by @RahulShagri on GitHub (Jul 6, 2025). ### Verified issue does not already exist? - [x] I have searched and found no existing issue ### What happened? [A recent bug fix](https://github.com/actualbudget/actual/issues/4794#issuecomment-2847492560) fixed the notes not being erased after entering a new transaction from the Actual Budget 'New Transaction' Widget app on Android. However, the account name still doesn't get erased. This not only happens when using "New Transaction" widget, but also when entering multiple new transactions using the App itself. ### How can we reproduce the issue? 1. Open Actual Budget on Android 2. Add a new transaction using the "+" icon at the bottom of the screen 3. Go back and hit the "+" icon again. The account name that was used in the previous transaction has not reset ### Where are you hosting Actual? Pikapods ### What browsers are you seeing the problem on? Chrome ### Operating System Mobile Device
GiteaMirror added the user interfaceresponsivebug labels 2026-02-28 20:08:26 -06:00
Author
Owner

@ShayanAraghi commented on GitHub (Aug 7, 2025):

Hey @matt-fidd @RahulShagri , I took a look at the codebase and it looks like the current behavior where the account name (and date) from the last transaction is prefilled is intentional for the mobile view.

In TransactionEdit.jsc, there's this useEffect block

  useEffect(() => {
    if (isAdding.current) {
      setTransactions(
        makeTemporaryTransactions(
          locationState?.accountId || lastTransaction?.account || null,
          locationState?.categoryId || null,
          lastTransaction?.date,
        ),
      );
    }
  }, [locationState?.accountId, locationState?.categoryId, lastTransaction]);

Here, lastTransaction is pulled from Redux:
const lastTransaction = useSelector(state => state.queries.lastTransaction);

From what I can tell, lastTransaction isn't used anywhere else in this component. Since the user interface says "New Transaction", and the user isn't starting from an account screen, it may be a good idea if the form started completely from a blank state, rather than carrying over the account and date from the last transaction. Happy to hear your thoughts or if there's a UX reason behind keeping it.

@ShayanAraghi commented on GitHub (Aug 7, 2025): Hey @matt-fidd @RahulShagri , I took a look at the codebase and it looks like the current behavior where the account name (and date) from the last transaction is prefilled is intentional for the mobile view. In TransactionEdit.jsc, there's this useEffect block ``` useEffect(() => { if (isAdding.current) { setTransactions( makeTemporaryTransactions( locationState?.accountId || lastTransaction?.account || null, locationState?.categoryId || null, lastTransaction?.date, ), ); } }, [locationState?.accountId, locationState?.categoryId, lastTransaction]); ``` Here, lastTransaction is pulled from Redux: `const lastTransaction = useSelector(state => state.queries.lastTransaction);` From what I can tell, lastTransaction isn't used anywhere else in this component. Since the user interface says "New Transaction", and the user isn't starting from an account screen, it may be a good idea if the form started completely from a blank state, rather than carrying over the account and date from the last transaction. Happy to hear your thoughts or if there's a UX reason behind keeping it.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/actual#2265