luceroweb / luceroweb/karot-saving-smart

Can't edit same expense twice

Open
#123 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

  • #124 by @srosenberg74 — closed without merging
bug Data Management Expenses Extra Money UX
Dominant language
TypeScript
Stars
3
Forks
13
PR merge metrics
No merged PRs in 30d

Description

Date Seen
6/6/22 11:50am

Versions
Linux
Chrome, Android Emulator (Pixel 4)
https://github.com/luceroweb/karot-saving-smart/tree/develop

Bug Description
When you edit an expense, and save your change, the edit is saved correctly. When you edit the same expense again, without leaving the expense detail view, the the expense data is not passed to the expense edit form, and submitting that form clears all of the expense data for that expense.

Steps to Reproduce

  1. Open the app
  2. Enter an expense
  3. Edit the expense and save
  4. Edit the same expense - you will see that the expense data was not passed into the expense edit modal.

Actual Behavior
When you edit an expense, and save your change, the edit is saved correctly. When you edit the same expense again, without leaving the expense detail view, the the expense data is not passed to the expense edit form, and submitting that form clears all of the expense data for that expense.

Expected Behavior
When editing an expense the second time, the expense data should be passed into the expense edit form, and when the form is saved, the expense data and the extra money values should all be updated to reflect the change.

Troubleshooting/Testing Steps Attempted
We set the default value of the Expense slice to an object like the following:

  list: [
    {
      label: "Rent",
      saved: 1000,
      goal: 1000,
      date: Number(Date.now()),
      id: "1",
    },
    {
      label: "Date Night",
      saved: 150,
      goal: 150,
      date: Number(Date.now()),
      id: "2",
    },
    {
      label: "Electricty",
      saved: 100,
      goal: 100,
      date: Number(Date.now()),
      id: "3",
    },
  ],

Attempted to edit an expense by adding value and by subtracting value.

Workaround
Delete the expense and re-enter it.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the listed steps in the app and trace how expense data moves from the expense detail view into the expense edit form. Done means editing the same expense twice preserves its data, and saving the second edit updates the expense and extra money values instead of clearing them.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.