PolicyEngine / PolicyEngine/policyengine-app-v2

Bug: Policy parameter changes (especially booleans) not saved to API - policy_json is empty

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

Nobody has claimed this yet.

bug
Dominant language
HTML
Stars
1
Forks
3
Avg merge
1d 50m
Merged PRs (30d)
39

Description

Update

Root cause identified: This was user error, not a code bug. The user changed the parameter value but didn't click "Add parameter" to apply it. See #604 for UX improvements to make this flow clearer.

Original Description

When creating a policy with parameter modifications (tested with boolean switches), the policy is created but the policy_json is empty, meaning no parameter changes are actually saved.

Steps to Reproduce

  1. Start creating a new report or policy
  2. Select a boolean parameter (e.g., gov.irs.deductions.itemized.charity.floor.applies - "AGI floor on charitable deduction")
  3. Change the boolean value (e.g., from true to false)
  4. Click "Add parameter" ← This step was missed
  5. Review and submit the policy
  6. The report shows "no impact" and "no policy parameters have changed"

Resolution

  • The real fix is #604 (UX improvement to make Add parameter more obvious) and #605 (block creating policies with no changes)
  • PR #603 still provides value as a code quality improvement (better immutability, unit tests) even though it doesn't fix the reported issue

Contributor guide

Open the contributing guide

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 reading the updates and the linked work in issues #604 and #605; this issue identifies the missed “Add parameter” action as the cause and says those issues contain the UX and validation fixes. Review PR #603 only for its separate code-quality and unit-test changes; this issue is done when the reported behavior is handled by that follow-up work.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.