You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
A farm animal usually cannot live longer than 20 years. The system should report error as farm animal usually cannot live for more than 20 years.
To Reproduce
Steps to reproduce the behavior:
Click the “Animal” asset tab.
Click the “Add Animal Asset” button.
Click name field and input “Chicken”.
Click species/breed field and input “Red
junglefowl”.
Click birthdate field and input animal birthdate
“01/01/1950 12:00:00”.
Others field remain as default
Click the “Save” button.
Expected behavior
System should report error as farm animal usually cannot live for more than 20 years.
Screenshots
Desktop (please complete the following information):
OS: 64-bit Windows 7, Windows 8.1, Windows 10, Windows 11
Browser: chrome
Version: 2.0.4
Smartphone (please complete the following information):
Device: [e.g. iPhone6]
OS: [e.g. iOS8.1]
Browser [e.g. stock browser, safari]
Version [e.g. 22]
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered:
I wouldn't consider this a bug. For example, horses or donkeys can easily live more than 20 years. Someone might also want to input into farmOS historical records that were earlier recorded on paper to have complete information of the current animals' lineage.
farmOS is intentionally designed to by default not limit the ways someone can use it. That said, limiting birthdates possible to input can for sure be useful for some operations to reduce accidental errors, but I would argue that such feature should be implemented as a contrib/custom module instead of as part of the farmOS core since the specific validation constraints can vary between farms depending on what/how animals are managed on them.
I've created an example implementation of such validation as a custom module https://github.com/wotnak/farm_animal_birthdate_limit. You can install and try it out on your farmOS instance, or use it as a base to implement some more custom form validation.
Thanks for opening this issue @Lok17 but I agree with @wotnak farmOS needs to allow entering historical records. If you were entering animal records that you recorded on paper 20 years ago for archival/organizational purposes, the animal's birthday would need to accommodate that.
Describe the bug
A farm animal usually cannot live longer than 20 years. The system should report error as farm animal usually cannot live for more than 20 years.
To Reproduce
Steps to reproduce the behavior:
junglefowl”.
“01/01/1950 12:00:00”.
Expected behavior
System should report error as farm animal usually cannot live for more than 20 years.
Screenshots
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: