In the Artifact links field of the Artifact modal, after selecting the "Create a new artifact" option, in the inline form, there is a problem with the two list-pickers. If I choose a Tracker and then I click on the "cross" icon on the right of the selection (to clear the selection), the list-picker will look visually empty (without selection) but the underlying <select>
element will have a value. Its value will be the first possible, non-disabled, <option>
. The code will then proceed and act like there is a Tracker selected when, for a human, there should not be any Tracker selected.
The same problem exists on the Projects list-picker, but is less of an issue, because the Project is only a way to select a Tracker. Only the Tracker is really required for the form.
To fix this problem, it turns out you need to add a special empty option <option value=""></option>
. Even when the <select>
is required
, this empty option will be selected when clearing the selection. The list-picker (correctly) does not show it in the dropdown. The code should then adjust to this "empty value" and react accordingly.
This is linked to request #32318 but in the specific corner of the Artifact modal