In ADO we have a requirement where we want to validate a date field in all workitems user should not be able to save a back date and we want to restrict it from all interfaces like work item form, query section(bulk update), boards. What are the options we have?
In ADO we have a requirement where we want to validate a date field in all workitems user should not be able to save a back date and we want to restrict it from all interfaces like work item form, query section(bulk update), boards. What are the options we have?
Share Improve this question edited Jan 29 at 15:50 Matt 4,0353 gold badges19 silver badges33 bronze badges asked Jan 20 at 15:17 Attinderdeep singhAttinderdeep singh 13 bronze badges 3- Is the date field a custom field that has been added for workitems? When you say "we want to restrict it from all interfaces" do you mean that the validation should be enforced (i.e. you want the restriction of the validation applied to the custom field) for all interfaces? – Jonathan Dodds Commented Jan 20 at 18:10
- Yes we have a custom field added and its used for release planning and yes we want the validation to restrict the user from added past date it should throw error please add today or future date … – Attinderdeep singh Commented Jan 21 at 0:35
- For a custom field there isn't a way to add a validation with a message as you have described. You can set up custom rules but they are triggers, not validations. You may need to explore either finding a custom control on the extension marketplace that does the job or writing your own custom control. – Jonathan Dodds Commented Jan 21 at 14:54
1 Answer
Reset to default 0You can add custom controls to a work item type. I found an extension named Rich Date Field Control from the Marketplace. It can set the range of the time of the date field.
Here is my test:
add custom controls to a work item type
When choose a time before today, it becomes red in the field:
When choose a time after today, it will not be red in the field: