[PR #6050] Recognize HTTP GET parameters to prefill new transaction on mobile #6293

Closed
opened 2026-02-28 21:26:17 -06:00 by GiteaMirror · 0 comments
Owner

Original Pull Request: https://github.com/actualbudget/actual/pull/6050

State: closed
Merged: Yes


Fixes #6031

Allow mobile new transaction page to be prefilled via HTTP GET parameters. To test, use this branch and visit:

http://localhost:3001/transactions/new?category=Food&amount=23.42&account=HSBC&date=2025-10-31&cleared=true&payee=Kroger&notes=Das+ist+eine+Notiz.+Sie+ist+nicht+sehr+lang!

All input fields should be filled in with the content specified in the URL.

I'm not sure whether it's a good idea to include accounts, categories and payees in the effect dependencies. Would that work with a fresh empty budget? As stated in the issue, I have no experience whatsoever with React, so please point me to a better way if so.


Note

New mobile transaction form now auto-fills fields from HTTP GET parameters (amount, payee, category, account, date, cleared, notes).

  • Mobile UI (TransactionEdit.tsx):
    • Read URL search params via useSearchParams to prepopulate date, payee, account, category, amount, cleared, and notes when creating a new transaction.
    • Map account, category, payee names to IDs; validate date; fallback to last transaction/current day and route state when params missing.
    • Remove makeTemporaryTransactions helper and inline new temp transaction creation logic.
  • E2E Tests:
    • Add test verifying form is prefilled from URL params in e2e/transactions.mobile.test.ts.
  • Release Notes:
    • Add entry announcing URL-based prefilling for mobile new transaction page.

Written by Cursor Bugbot for commit 87531c7282. This will update automatically on new commits. Configure here.

**Original Pull Request:** https://github.com/actualbudget/actual/pull/6050 **State:** closed **Merged:** Yes --- Fixes #6031 Allow mobile new transaction page to be prefilled via HTTP GET parameters. To test, use this branch and visit: ``` http://localhost:3001/transactions/new?category=Food&amount=23.42&account=HSBC&date=2025-10-31&cleared=true&payee=Kroger&notes=Das+ist+eine+Notiz.+Sie+ist+nicht+sehr+lang! ``` All input fields should be filled in with the content specified in the URL. I'm not sure whether it's a good idea to include `accounts`, `categories` and `payees` in the effect dependencies. Would that work with a fresh empty budget? As stated in the issue, I have no experience whatsoever with React, so please point me to a better way if so. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > New mobile transaction form now auto-fills fields from HTTP GET parameters (amount, payee, category, account, date, cleared, notes). > > - **Mobile UI (`TransactionEdit.tsx`)**: > - Read URL search params via `useSearchParams` to prepopulate `date`, `payee`, `account`, `category`, `amount`, `cleared`, and `notes` when creating a new transaction. > - Map `account`, `category`, `payee` names to IDs; validate `date`; fallback to last transaction/current day and route state when params missing. > - Remove `makeTemporaryTransactions` helper and inline new temp transaction creation logic. > - **E2E Tests**: > - Add test verifying form is prefilled from URL params in `e2e/transactions.mobile.test.ts`. > - **Release Notes**: > - Add entry announcing URL-based prefilling for mobile new transaction page. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 87531c7282219645362956c3a32e3889146965d1. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
GiteaMirror added the pull-request label 2026-02-28 21:26:17 -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#6293