PolicyEngine / policyengine-app

PolicyEngine's free web app for computing the impact of public policy.
GNU Affero General Public License v3.0
41 stars 108 forks source link

Do not create new households when the user is editing a household #998

Open abhcs opened 11 months ago

abhcs commented 11 months ago

This issue is the household counterpart to issue #691. It is less severe than #691 since duplicates are not created.

Steps to reproduce:

  1. Create a household with income x.
  2. Note the household id in the URL as i.
  3. Edit the income.
  4. Note the household id in the URL as j.

Observe that i $\neq$ j.

Expected output

We should see i = j, i.e., the household id should not change while the user is editing the current household. A new household should be created only when the user explicitly instructs the app to do so.

When the user asks the app to create a new household, the app should:

  1. Show them the current household id asking them to note it down for future reference.
  2. Ask them to confirm if they want to create a new household, warning that they may lose access to their previous work.
  3. Allow them to back to editing the current household.
anth-volk commented 11 months ago

I think this would be best integrated into a more comprehensive rethink and rebuild of the current calculator flow down the road. That said, it is reasonably important.