Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Seeding Report Editing Issues/Bugs/Concerns #466

Open
braughtg opened this issue Jun 7, 2022 · 3 comments
Open

Seeding Report Editing Issues/Bugs/Concerns #466

braughtg opened this issue Jun 7, 2022 · 3 comments
Assignees
Labels
enhancement Improvement to the project question Further information is requested UI/UX User Interface / User Experience Improvement

Comments

@braughtg
Copy link
Member

braughtg commented Jun 7, 2022

Which columns in the seeding report should be editable and when?

  • It seems to make sense that some columns should be editable and some may not be.
    • For example, you can edit hours but not the type of seeding.
    • When a column that needs to be changed (e.g. type of seeding) is not editable the solution is to delete the log and recreate it.
  • Seems like some things should be able to be edited or deleted only under certain conditions.
    • What happens if a transplanting or harvesting log already exists that is associated with the seeding?
    • This needs to be researched. Perhaps if the planting is changed then everything will be alright?
    • Note however that the crop_tid field added to the seeding logs to make it unnecessary to fetch the plantings will also need to be updated if the crop is edited.
  • When editing the location of a seeding the options should be consistent with the seeding type.
    • Only greenhouses for tray seedings and only field or bed locations for direct seedings (as in the input form)
  • When editing fields that are constrained (e.g. hours or workers) the edit field should be a RegexInputComponent with an appropriate regular expression to prevent invalid inputs.
@braughtg braughtg added enhancement Improvement to the project UI/UX User Interface / User Experience Improvement labels Jun 7, 2022
@braughtg braughtg added this to Summer22 Jun 7, 2022
@braughtg braughtg moved this to Todo in Summer22 Jun 7, 2022
@braughtg braughtg added the question Further information is requested label Jun 16, 2022
@braughtg braughtg self-assigned this Jun 16, 2022
@braughtg braughtg moved this from Todo to Blocked in Summer22 Jul 4, 2022
@FutzMonitor
Copy link
Collaborator

FutzMonitor commented Jul 12, 2022

It seems that a separate issue should be opened to address what was discussed yesterday concerning an inflexibility of the CustomTableComponent: buttons. Every time a new button needs to be added to a table, the component shouldn't have to grow every time.

A potential discussed solution to the button problem:
We remove all the buttons currently in the CustomTableComponent (save/cancel/edit/delete) and just add a general button prop that can be added to the end of the component. This increases the flexibility of the component because it reduces the burden of adding buttons to the component and puts that responsibility back on the page which should handle those button presses. We would have to think about how one prop will account for many buttons, but I'm sure that wouldn't be too difficult.

NOTE: Addressed in Issue #530.

@braughtg
Copy link
Member Author

Issue #530 addresses potential updates to the CustomTableComponent that may affect a solution to this issue.

@braughtg braughtg changed the title Seeding Report Editing Constraints Seeding Report Editing Issues/Bugs/Concerns Jul 20, 2022
@FutzMonitor
Copy link
Collaborator

I believe it would be worthwhile to consult with Matt which elements of the logs should be editable from the report table. Here are a couple of bugs concerning edits and the report table that I have witnessed.

  1. Editing the row feet causes the bed feet to be recalculated. Normally this wouldn't be an issue, but it's misleading when the user changes both row feet and bed feet only for bed feet to ignore the user's input and recalculate itself. Perhaps it might be worthwhile disabling an element when one that affects its recalculation is being changed.
  2. Editing the date, area, and crop all currently do not update the log in the backend.
  3. Editing certain elements doesn't actually update them in the backend. This is detailed thoroughly in Seeding Report: Logs Are Not Being Updated #544

braughtg pushed a commit that referenced this issue Jan 18, 2023
__Pull Request Description__

Closes #562. This issue makes some changes to the `updateRow` function
located in the Transplanting Report HTML file
[[here](https://github.com/FarmData-2-Dev-Team-2022/FarmData2/blob/fixTransplantingBackend/farmdata2/farmdata2_modules/fd2_barn_kit/transplantingReport/transplantingReport.html)].
These changes are not accompanied by any Cypress e2e testing as that is
a separate issue to be addressed in issue #578. As a result, these
changes have been tested by sight using Hoppscotch.

Additionally, this PR makes a quick fix of the filters for both the
Seeding Report and Transplanting Report where editing once would
permanently disable the filters until the page was refreshed because the
name of the edit cancellation event was changed and the pages were not
updated accordingly to reflect this change.

This PR also brings up the topic of #585 (and #466) of what should be
edit-able. I disabled the ability to edit `bed feet` in the
Transplanting Report because transplanting logs don't have quantity data
for `bed feet` but also enabled the ability to edit `row/bed` because
that does exist in the logs' quantity data. However, should users be
allowed to edit that data? This is beyond the scope of this PR but
wanted to quickly mention this quick thought that occurred to me whilst
making this fix.

---
__Licensing Certification__

FarmData2 is a [Free Cultural
Work](https://freedomdefined.org/Definition) and all accepted
contributions are licensed as described in the LICENSE.md file. This
requires that the contributor holds the rights to do so. By submitting
this pull request __I certify that I satisfy the terms of the [Developer
Certificate of Origin](https://developercertificate.org/)__ for its
contents.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improvement to the project question Further information is requested UI/UX User Interface / User Experience Improvement
Projects
Status: Blocked
Development

No branches or pull requests

2 participants