PolicyEngine / PolicyEngine/policyengine-app-v2
Bug: Policy parameter changes (especially booleans) not saved to API - policy_json is empty
Nobody has claimed this yet.
- 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
- Start creating a new report or policy
- Select a boolean parameter (e.g.,
gov.irs.deductions.itemized.charity.floor.applies- "AGI floor on charitable deduction") - Change the boolean value (e.g., from true to false)
Click "Add parameter"← This step was missed- Review and submit the policy
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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