0
votes

I am working on VSTS extension and I have requirement to populate work item types to combo box based on project's process template .

for example : If user have project with agile template work item types should load accordingly and If user use project with scrum template different set of work item types should available in combo-box (note that in below list we got "Impediment" in Scrum instead of "Issue" in agile)

process template : Agile

  • Task
  • Bug
  • Issue
  • Epic
  • Feature
  • Test case

process template : Scrum

  • Task
  • Bug
  • Impediment
  • Epic
  • Feature
  • Test case

as we just have control over task.json file to define UI, I found it not possible to dynamically populate different set of combo box items. Is there any way to achieve this? Please show some light on this.

Thanks in advance

1

1 Answers

1
votes

You could use PickList in your customize task, one for process template such as Agile/Scrum, another child picklist dynamically change based on the template you selected above.

Just put the value of all work item types corresponding to the process template in child picklist, the UI should be something as below:

enter image description here

More details about how to achieve this through API please refer this link: How to display "Area path" in VSTS build task input PickList?

You could also take a look at below tutorials:

There are some threads can help you:


About how to get all work item types, you could use Work Item Types - List Rest API, this will return the list of work item types for a project. One Team Project could only have one kind of process template:

GET https://{accountName}.visualstudio.com/{project}/_apis/wit/workitemtypes?api-version=4.1