microsoft/azure-pipelines-task-lib

'required' field is practically ignored

eRez-ws opened this issue · 3 comments

Environment

azure-pipelines-task-lib version: 3.1.2

Issue Description

in my task's task.json file, under inputs i have "required": true parameter in one of the inputs. which is practically ignored
image
image

Expected behaviour

when the task is added to the pipeline, there should be a red * next to the field name, and if that field is left empty it should be marked with a red rectangle around it (or something similar) and the task cannot be added to the pipeline.

Actual behaviour

there's a red * indeed, but if that field is left empty, nothing happens and the task can be added to the pipeline.

Steps to reproduce

  1. add "required": true to one of the input fields in the task.
  2. build and upload the task.
  3. when editing the pipeline, add task

Hi, @eRez-ws could you please clarify if you use classic pipeline editor (UI editor) or YAML pipelines with UI assistant?

YAML (as appears in the first screen-shot)

@eRez-ws, this problem looks like UI problem and it is not related to this lib.
I checked and classic pipeline editor (UI editor) has correct expected behavior: marks empty required field with a red rectangle around it and doesn't allow to save such pipeline.
In YAML editor, if required field is left empty, it shows only warning.

Please create issue on developer community about it: https://developercommunity.visualstudio.com/report?space=21&entry=problem