•  
      request #32627 In Link field artifact creation form, clearing the trackers or project list will select the first enabled value
    Infos
    #32627
    Joris MASSON (jmasson)
    2023-06-21 16:11
    2023-06-21 12:21
    34217
    Details
    In Link field artifact creation form, clearing the trackers or project list will select the first enabled value

    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

    Agile Dashboard
    development
    Empty
    • [ ] enhancement
    • [ ] internal improvement
    Empty
    Stage
    Joris MASSON (jmasson)
    Closed
    2023-06-21
    Attachments
    Empty
    References

    Follow-ups

    User avatar
    Joris MASSON (jmasson)2023-06-21 12:21
    • Original Submission
      Something went wrong, the follow up content couldn't be loaded
      Only formatting have been changed, you should switch to markup to see the changes