Author: Sayaka Ono
...
When | When the value is(was) pre-populated by the system | When a value is NOT pre-populated by the system or was user created |
---|---|---|
creating | the https://lite-farm.atlassian.net/wiki/spaces/LITEFARM/pages/658309153/Unit+displays#Default-display-guidance should determine the value / unit combination | the user set unit preference should be used What is the “user set unit preference”? Is it a record-to-record unit(a record has not been created on a creation view) or user’s farm unit system preference (metric/imperial)? |
read-only | the https://lite-farm.atlassian.net/wiki/spaces/LITEFARM/pages/658309153/Unit+displays#Default-display-guidance should be used | the user set unit preference should be used |
editing | the https://lite-farm.atlassian.net/wiki/spaces/LITEFARM/pages/658309153/Unit+displays#Default-display-guidance should be used | the user set unit preference should be used |
automatic conversion - we will go with easier solution.
We do not need to see automatic conversion at all for now? (how about the total area?)
...
User’s farm unit system preference is “imperial”. The user created a barn and the total area was 50,000 acres. He switched the unit system to “metric”. (the record-to-record unit and the unit system setting don’t match)
-> The total area should be displayed in ha as determined by the default display guidance. (not record-to-record unit?)Jira Legacy server System JIRA serverId 815f41e5-e5fb-3402-8587-82eccc3ffab0 key LF-2880 User’s farm unit system preference is “imperial”. The user created a crop plan with planting depth 3 inches.
-> The depth should be stored in XXX.
“depth” is not in the https://lite-farm.atlassian.net/wiki/spaces/LITEFARM/pages/658309153/Unit+displays#Default-display-guidance. Is there a guidance for depth and spacing?
...
proposed approach | alternative approach | |
---|---|---|
backfill data | find wrong data and write a script | |
database | no change required | |
APIs |
| no change required |
frontend |
|
|
auto conversion | DB: need migration (auto conversion property in the userFarm table) | |
backend: update the helper or middleware to take user setting into account | frontend: update the hook to take user setting into account | |
pros |
|
|
cons |
|
|
...
PR | merge to | estimate in story points | |
---|---|---|---|
1 | extract logic from the current unit component and create a hook | feature branch | 2 |
2 | update the unit component to make it work as a presentation component | feature branch | 2 |
3 | fix the logic in the hook feature Check:
| feature branch | 8 |
4 | test all instances and make adjustments and fix issues (hopefully write tests)
| feature branch, and then create a PR against integration branch | 8 |
TODO
estimate in story points
1
backfill data
depending on how much wrong data we have
- 13 | |||
5 | Pop-up when changing system of measure at your farm warning that everything will default based on the value. | integration |