senaite / senaite.core

Enterprise Open Source Laboratory System (LIMS)
https://senaite.com
GNU General Public License v2.0
244 stars 144 forks source link

AR Create. Sample Type does not autocomplete with Sample Point #547

Open lemoene opened 6 years ago

lemoene commented 6 years ago

Sample Type / Sample Point selection used to limit look-ups options on their counterparts to save clicks during AR Create. Sample Type is often unique per Sample Point and best explained

Steps to reproduce

Select a Sample Point that has a Unique Sample Type assigned to it, eg

image

image

Current behavior

Sample Type field is left empty after the Sample Point with fixed Sample Type, Dust, was selected

Expected behavior

The Sample Type field to be auto-completed with dust.

And where more than one Sample Type is available at the Sample Point, the former's look-up be restricted to the valid Sample Type only. This used to work the otherway round too, but is not used that much and can be ignored in the interest of simplicity. I suppose one could raise a warning, and/or simply proceed.

Can be worked around in AR templates but to good to leave off AR Create

mikejmets commented 2 years ago

This commit solves this issue although I would like to discuss better ways to solve.