Tasks: no auto Repiquage at perennial establishment#93
Merged
Conversation
Creating a perennial planting (fruit tree, perennial) auto-generated a
Transplant ("Repiquage") task at its establishment date. But perennials are
typically planted from bought stock — there's nothing to transplant — so the
task is spurious and confusing (reported in pre-prod).
`phase_dates` now yields no trigger for `PlantingSchedule::Perennial`; annual
cycles are unchanged (Sow / Transplant / Harvest as before). The user can
still add a planting task by hand if they raise their own stock.
Tests updated: perennial creation now generates zero tasks.
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
guycorbaz
added a commit
that referenced
this pull request
Jun 9, 2026
…nts) (#94) Qrop models three ways to start a crop; Pomone only did "from sowing", which generated wrong tasks (e.g. Repiquage on a bought tree). Add the method as a per-planting choice that drives the inferred dates and the auto-tasks. - App: `EstablishmentMethod { DirectSow, RaisedTransplant, BoughtPlants }` + unified `create_annual_planting(method, date, …)`. The method is encoded by which Cycle dates are set (no new column): direct = sown only; raised = sown+transplant (via DTT); bought = transplant date only, no sow. Reuses the existing `infer_cycle_from_sowing` / `infer_cycle_from_transplant`. `create_annual_planting_from_sowing` kept as a thin Raised wrapper. - Task auto-gen: a richer `Trigger` distinguishes Repiquage (raised) from Plantation (bought / perennial). Perennials now get a "Plantation" task at establishment (supersedes the no-task behaviour of #93). - Seed: a "Plantation" task type (Transplant category, no migration — SQLite CHECK can't gain a value without an unsafe rebuild). Additive backfill in `seed_defaults` for already-seeded DBs. Auto-gen picks it by name with a fallback. - UI: an "Établissement method" selector on the annual planting form; the date field is a sowing date (direct/raised) or a planting date (bought). i18n fr/en for the method labels. Tests: phase_dates (sow/transplant/plant/harvest cases), services (direct → Sow+Harvest, bought → Plantation+Harvest, perennial → Plantation), seed count. Workspace green (cargo test/clippy/fmt). Verified on seed-demo: the apple gets a Plantation task. Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pre-prod feedback: creating a perennial planting (apple, plum…) auto-generated a Repiquage (Transplant) task at its establishment date. Perennials are planted from bought stock — nothing to transplant — so the task is spurious.
Change
phase_dates(task_autogen) yields no trigger forPlantingSchedule::Perennial. Annual cycles are unchanged (Sow / Transplant / Harvest). Users who raise their own stock can still add a task by hand.Verification
perennial_yields_no_trigger,creating_perennial_planting_generates_no_task.cargo test -p pomone-appgreen (150), clippy + fmt clean.🤖 Generated with Claude Code