mstenta / farm_crop_plan

Crop plan type and related features for farmOS. (ALPHA 3.x IN DEVELOPMENT)
https://drupal.org/project/farm_crop_plan
GNU General Public License v2.0
5 stars 1 forks source link

Can only add single quantities #2

Closed paul121 closed 4 years ago

paul121 commented 4 years ago

I took a first pass at adding quantities to the Crop Plan form.

One obvious limitation here is that we can only create one quantity per log.

But the larger issue is that the crop plan form only looks for the first quantity that was created on a log - we aren't using the label field, so there isn't an easy way to identify which quantities were created from the crop plan form. This also means that when modifying a quantity via the form, I have to delete all quantities from the log, and then create a new one.

Is the only solution here to search through all existing quantities and find the one which measure + value + units matches, and update accordingly?

mstenta commented 4 years ago

@paul121 and I discussed this and decided that the best next step is to change it so that it only updates the first quantity, rather than deleting all of them and recreating one.

Reasoning:

mstenta commented 4 years ago

change it so that it only updates the first quantity, rather than deleting all of them and recreating one.

FYI @paul121 made this change: https://github.com/mstenta/farm_crop_plan/commit/e1c7bd8e6a5cb98b22dc2c7b2798320bd4a1efa3