•  
      request #30385 None value must be added in the modal regardless of default value
    Infos
    #30385
    Joris MASSON (jmasson)
    2023-01-23 10:55
    2023-01-19 12:46
    31990
    Details
    None value must be added in the modal regardless of default value

    How to reproduce the issue:

    1. set up a tracker with two fields: a Source field and a Target Selectbox field. The Source field can be selectbox or multi-selectbox.
    2. choose a default value for the Target Selectbox field
    3. set up field dependencies from Source field to Target field. There must be at least one that targets "None"
    4. open the artifact modal, choose the Source value
    5. The Target field is empty, there is no "None" value, and there are no values to choose from. If you try to submit, the backend will reject it due to missing field dependency.

    Contrary to what request #28255 says, "None" should be added even when a selectbox field has a default value. The default value should still be selected nonetheless, but the absence of "None" causes problems with field dependencies.

    Field dependencies administration allows targeting "None" despite the field being required or having a default value. If we don't add "None" in those situations, it makes it impossible to submit the artifact because field dependencies will require a "None" value that is absent.

    The artifact UI also adds "None" value to selectbox fields, regardless of the presence of a default value.

    The issue was pre-existing (since git #tuleap/stable/702e33f9b78eb151003720c85f4a67c128a4d251) but was made visible by git #tuleap/stable/a4aa0b4475ef5ddb6cd95d689c3252db4cedf94b

    Trackers
    development
    Empty
    • [ ] enhancement
    • [ ] internal improvement
    Empty
    Stage
    Joris MASSON (jmasson)
    Closed
    2023-01-23
    Attachments
    Empty
    References

    Follow-ups

    User avatar
    Joris MASSON (jmasson)2023-01-20 10:02
    • 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