Preferred names
As @jalarcon describes in grin-global-ui#291 (closed), the UI should also display the "preferred name" of Accession
or Inventory
records.
The preferred name of an Inventory
is the first String AccessionInvName.plantName
of inventory.names
ordered by plantNameRank ASC
(the one with the lowest rank). For Accession
we use the preferred name of accession's SYSTEM inventory.
Ideally, the preferred name would be calculated by the database using @Formula
so that it can also be used in filters and in sorting.