Skip to content

Add missing a_nmin_cc field to FormSchema#541

Merged
SvenVw merged 1 commit into
developmentfrom
FDM540
Apr 1, 2026
Merged

Add missing a_nmin_cc field to FormSchema#541
SvenVw merged 1 commit into
developmentfrom
FDM540

Conversation

@SvenVw
Copy link
Copy Markdown
Collaborator

@SvenVw SvenVw commented Apr 1, 2026

Summary by CodeRabbit

  • Bug Fixes
    • Fixed soil analysis field storage to ensure nitrogen mineralization values are properly retained when entered.

Closes #540

@SvenVw SvenVw self-assigned this Apr 1, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 1, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 904b12c0-47ff-4c43-a778-2011f7e6b695

📥 Commits

Reviewing files that changed from the base of the PR and between 585d1d0 and c0d31b1.

📒 Files selected for processing (2)
  • .changeset/yellow-papayas-visit.md
  • fdm-app/app/components/blocks/soil/formschema.tsx

📝 Walkthrough

Walkthrough

A changeset and schema fix were added to address a bug where a_nmin_cc (available mineral nitrogen) values submitted in soil analysis forms were being silently discarded. The field was missing from the FormSchema, causing Zod validation to strip it during submission.

Changes

Cohort / File(s) Summary
Changeset
.changeset/yellow-papayas-visit.md
Added changeset entry documenting the patch fix for a_nmin_cc storage in soil analysis.
Schema Update
fdm-app/app/components/blocks/soil/formschema.tsx
Added optional a_nmin_cc field with preprocessing, number coercion, and range validation (0–500) matching the pattern of existing comparable fields.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

  • FDM197 #199: Modifies soil-analysis parameter handling by updating the action to pass additional soil estimate fields into addSoilAnalysis, complementing this schema fix.

Suggested labels

fdm-app, bug, branch:development

Suggested reviewers

  • gerardhros

Poem

🐰 A nitrogen field lost in the void,
Now safely stored, no longer destroyed,
Schema complete, validation in place,
Soil data finds its rightful space!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Linked Issues check ✅ Passed The pull request correctly implements the required fix from issue #540 by adding the a_nmin_cc field to FormSchema with proper preprocessing, type coercion, and range validation (0-500).
Out of Scope Changes check ✅ Passed All changes are directly scoped to fixing the reported issue; only the changeset and the formschema.tsx modification are included without extraneous alterations.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Title Check ✅ Passed Title check skipped as CodeRabbit has written the PR title.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch FDM540

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@sentry
Copy link
Copy Markdown

sentry Bot commented Apr 1, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@coderabbitai coderabbitai Bot changed the title @coderabbitai Add missing a_nmin_cc field to FormSchema Apr 1, 2026
@SvenVw SvenVw requested a review from BoraIneviNMI April 1, 2026 10:24
Copy link
Copy Markdown
Collaborator

@BoraIneviNMI BoraIneviNMI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch.

@SvenVw SvenVw merged commit 4a112d8 into development Apr 1, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

a_nmin_cc value not stored when filling in soil analysis

2 participants