MicrosoftPremier / VstsExtensions

Documentation and issue tracking for Microsoft Premier Services Visual Studio Team Services Extensions
MIT License
56 stars 14 forks source link

Top projects (100 default) in create work item #108

Closed gonchalo620 closed 3 years ago

gonchalo620 commented 3 years ago

We are using the create work item extension, in an Azure DevOps organization that has more than 100 projects. The Rest API of Azure DevOps defaults to the first 100 projects, that's why we have a problem wanting to select some projects.

This can be solved by adding the $top=300 parameter to the uri they are using in the task.json file in the sourceDefinitions, target = teamProject, and endpoint /_apis/projects?api-version=3.0 to change it to /_apis /projects?$top=300&api-version=3.0

image image

Url API REST Azure DevOps, Projects: https://docs.microsoft.com/en-us/rest/api/azure/devops/core/projects/list?view=azure-devops-rest-5.1

ReneSchumacher commented 3 years ago

Hi @gonchalo620,

thanks for reporting this. I will increase the number of returned projects to the highest possible value. I know that there is a limit of 1000 but I still have to check, if the API enforces paging. Since the task UI does not support paging in any way, I'll make the field editable if necessary. This is a quick fix to the new version should be out tomorrow.

René

ReneSchumacher commented 3 years ago

Hi again,

I have just release v1.8.3 of the extension that now reads the first 1000 projects. There shouldn't be any org on the planet with that number of projects :)

Happy building René

gonchalo620 commented 3 years ago

Thank you very much.