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

Closed
opened 2026-05-01 02:39:38 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/actualbudget/actual/pull/6050
Author: @diktomat
Created: 11/1/2025
Status: Merged
Merged: 11/13/2025
Merged by: @MatissJanis

Base: masterHead: feat/prefill_new_transaction


📝 Commits (3)

  • eef5289 Recognize HTTP GET parameters to prefill new transaction on mobile (#6031)
  • f1891de Add test for prefilling mobile transactions
  • 87531c7 Merge branch 'master' into feat/prefill_new_transaction

📊 Changes

3 files changed (+79 additions, -26 deletions)

View changed files

📝 packages/desktop-client/e2e/transactions.mobile.test.ts (+25 -0)
📝 packages/desktop-client/src/components/mobile/transactions/TransactionEdit.tsx (+48 -26)
upcoming-release-notes/6050.md (+6 -0)

📄 Description

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.


🔄 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/6050 **Author:** [@diktomat](https://github.com/diktomat) **Created:** 11/1/2025 **Status:** ✅ Merged **Merged:** 11/13/2025 **Merged by:** [@MatissJanis](https://github.com/MatissJanis) **Base:** `master` ← **Head:** `feat/prefill_new_transaction` --- ### 📝 Commits (3) - [`eef5289`](https://github.com/actualbudget/actual/commit/eef5289a2e5b89d100824483c3270ee5014f767d) Recognize HTTP GET parameters to prefill new transaction on mobile (#6031) - [`f1891de`](https://github.com/actualbudget/actual/commit/f1891de81f18d3be3bd41c55fefb6a9a1c4e2f26) Add test for prefilling mobile transactions - [`87531c7`](https://github.com/actualbudget/actual/commit/87531c7282219645362956c3a32e3889146965d1) Merge branch 'master' into feat/prefill_new_transaction ### 📊 Changes **3 files changed** (+79 additions, -26 deletions) <details> <summary>View changed files</summary> 📝 `packages/desktop-client/e2e/transactions.mobile.test.ts` (+25 -0) 📝 `packages/desktop-client/src/components/mobile/transactions/TransactionEdit.tsx` (+48 -26) ➕ `upcoming-release-notes/6050.md` (+6 -0) </details> ### 📄 Description 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 --> --- <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-05-01 02:39:38 -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#55597