actualbudget / actualbudget/actual

[Bug]: Calling API updateTransaction for a sub-transaction clears the category & amount

Offen
#5,012 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
API
Vorherrschende Sprache
TypeScript
Sterne
28.8k
Forks
3k
Ø Merge
2 T. 11 Std.
Gemergte PRs (30 T.)
65

Beschreibung

### Verified issue does not already exist?

- [x] I have searched and found no existing issue

### What happened?

If there is a split transaction like this:

![Image](https://github.com/user-attachments/assets/5b2be712-03a9-4c79-b411-fdcf5bfc8baa)

And the following code is run (where `'e070264d-98a9-4c91-b5e0-d4c1a63a219a'` is the id of one of the sub transactions)
```
const api = require('@actual-app/api');
await api.updateTransaction('e070264d-98a9-4c91-b5e0-d4c1a63a219a', {notes: 'New notes'});
```

Then this will be the result:

![Image](https://github.com/user-attachments/assets/3f13dec5-6e96-4ae8-93a4-a11b36b37bf0)

As you can see, the notes have been updated, but the category & amount has been cleared.

This does not happen for transactions that are not split.

### How can we reproduce the issue?

Repro steps provided above

### Where are you hosting Actual?

Other

### What browsers are you seeing the problem on?

Chrome

### Operating System

Windows 11

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Start by tracing the updateTransaction entry point in @actual-app/api using the supplied sub-transaction ID and split-transaction reproduction. Verify the behavior with a split transaction, then confirm that updating only notes preserves the sub-transaction's category and amount.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
typescript
Bereich
api
Issue-Typ
Bug
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Veraltet
Klarheit
Klar beschrieben
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.