Skip to content

Let plantings use a crop's alternate name - #4828

Merged
CloCkWeRX merged 1 commit into
devfrom
alt-names
Sep 21, 2026
Merged

CloCkWeRX merged 1 commit into
devfrom
alt-names

Conversation

@Br3nda

@Br3nda Br3nda commented Sep 21, 2026 •

Copy link
Copy Markdown
Member

Summary

A crop like calabash can have alternate names such as "lauki". Search already found crops by alternate name (#4132); this lets a planting use one and display it in place of the crop's primary name.

  • New nullable plantings.alternate_name_id (FK, nullified if the alternate name is deleted). Validated to belong to the planting's crop.
  • Planting#display_name returns the chosen alternate name, else the crop name. Used on planting cards, the planting page (with the crop name shown alongside), garden lists, the member page, the homepage and the RSS/ICS feeds.
  • The planting form has an optional "What do you call it?" select, populated with the chosen crop's alternate names. alternate_names#index accepts a crop_id filter to feed it.
  • Crop autosuggest now shows the alternate name that matched, e.g. typing "aubergine" offers "aubergine (eggplant)" (matched_alternate_name in the search JSON). Picking it preselects that name on the planting form.

Not changed: the API's crop_name, and other members' plantings in the "same latitude" list, which still show the crop name.

Part of #554

🤖 Generated with Claude Code

A planting can now choose one of its crop's alternate names (eg. "lauki"
for calabash, "aubergine" for eggplant) and shows it instead of the
crop's primary name.

- plantings.alternate_name_id, validated to belong to the planting's crop
- Planting#display_name, used on cards, the planting page, garden lists,
  the member page, the homepage and the RSS/ICS feeds
- planting form offers the crop's alternate names, preselecting the one
  that was searched for
- crop autosuggest shows the matched alternate name, eg.
  "aubergine (eggplant)", via matched_alternate_name in the search JSON

Part of #554

Co-Authored-By: Claude Sonnet 5 <[email protected]>
@CloCkWeRX
CloCkWeRX merged commit c0cd7a6 into dev Sep 21, 2026
16 checks passed
@CloCkWeRX
CloCkWeRX deleted the alt-names branch September 21, 2026 12:34
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.

2 participants