DickinsonCollege / FD2School-FarmData2-F23

FarmData2 provides support for the operation and certification requirements of small organic farming operations.
Other
0 stars 20 forks source link

Seeding Report: Duplicates appearing in Crop Dropdown when editing a record #53

Open braughtg opened 1 year ago

braughtg commented 1 year ago

The Crop drop-down in the Seeding Report form contains duplicates. Each Crop should appear in this list only one time.

image image

Steps to Reproduce

  1. Clear browsing data
  2. Visit the Seeding Report form
  3. Click the edit button on any record
  4. Observe that items are repeated twice

You can use Vue to clearly see that the computed method cropNameArray, which returns the list of crop names to the Crop drop-down menu, has a length of 222 items. There are only 111 crop names.

image

The cropNameArray is fed to the second column of the table as observed by the line of code below, which can be found at https://github.com/DickinsonCollege/FarmData2/blob/main/farmdata2/farmdata2_modules/fd2_barn_kit/seedingReport/seedingReport.html

{"header": 'Crop', "visible": true, "inputType" : {'type': 'dropdown', 'value': this.cropNameArray}}


Original issue by Shahir-47 Wednesday May 03, 2023 at 18:36 GMT

calebloring commented 10 months ago

I would like to work on this

bkollmar commented 10 months ago

Will it be sufficient for the test to only check length of the array is correct? Or should we further test to make sure the correct crops are listed in the array in the correct order.