Another idea that has come up while thinking about quantities with various people. The label is another common point of complexity/confusion and wondering if it could be improved by using a taxonomy instead. From our docs: “A Quantity may have a label assigned to it. This helps to distinguish multiple Quantities of the same measure within a Log.”: Quantities | farmOS
There are a few general reasons a taxonomy could be an improvement for the quantity label:
- One step towards consistent quantity labels, eg: prevent “gallons” vs “gallon” by referencing a common term
- Ability to see a list of all unique quantity labels (currently this is very hard to curate in the UI on a farmOS instance with 1000s of quantities)
- One step towards “machine readable” label, maybe a solution to what @Symbioquine described here: The fields in a quantity entity - #2 by Symbioquine (A term is not necessarily required for this, but may be an easy solution to provide some type of custom “ID” field for quantity labels if the term ID is not sufficient by itself)
- Potential ability for a quantity label term to define the default
measure
orunits
associated with it. This could be single or multi-value if a given label is used in different contexts.
Another observation I had relates to the new quantity material
and test
quantity types and how the label
it is (or isn’t) used to distinguish multiple quantities on a log. These types allow quantities to be distinguished by a material_type
or test_method
taxonomy term reference in addition to the optional label
.
- In practice I see that most
material
quantities do not use the label. - The
test
quantity convention specifies they “MUST include a “Label” to represent the soil indicator that is being measured.” - however I wonder if this soil indicator could actually be specified by thetest_method
term instead, and not require the element be a label? If this were the case… - Could quantities be refactored to not need separate
material
andtest
quantity types, and instead let the single quantitylabel
field reference a single term from any of these taxonomies: quantity label (better naming?), material type, or test method?