victorbalssa / abacus

🟠 Abacus: Firefly III mobile application.
https://apps.apple.com/us/app/1627093491
GNU General Public License v3.0
566 stars 42 forks source link

Bug: transaction source account cannot be edited #282

Closed a1ex4 closed 6 months ago

a1ex4 commented 6 months ago

Describe the bug Transactions cannot be edited to change the source account. In the transaction list, clicking on one to access the edit form, changing the source account (to an already existing one) and pressing Submit, the popup shows Sucess but the transaction remain unchanged.

I checked the Firefly logs following the app request, and then did the same transaction edit from the Web UI to compare the logs. I can make them available but they are quite marge and full of personal info. And the HTTP requests content is not logged in the server logs.

Though comparing the logs it seems that from the Web UI, selecting an existing account in the form will then set the account ID in the request, while in the request from the app there is only the account name, even if the account is selected with the autocomplete in the form: image

The source_id and destination_id are then propagated as null, which might be the root cause, see around line 96/98. Then the source account is not valid: image

To Reproduce Steps to reproduce the behavior:

  1. Go to Transactions
  2. Click on any transaction to open the edit form
  3. Change the source account to an already existing one
  4. Click Submit
  5. The request is successfull, but the transaction's source account is unchanged

Expected behavior The transaction should be updated as per the form's values.

Smartphone (please complete the following information):

Additional context None, thank you very much for this amazing app!