Search code examples
azure-devopsazure-devops-extensionsazure-devops-rest-api

VSTS Extension Data Storage on Project Scope Level


I have successfully created a settings page with my work item page extension that automates the generation of dev, doc, qa, and testware tasks on work items. The settings page is for modifying the branches ("6.14", "6.15", etc.) that the tasks could be generated for. Using the Data Storage client service API, the extension currently saves settings on a project collection level. What I want to do is have the extension with the settings be unique for each project the extension is installed on.

Question 1: Can extensions be installed on a per project basis? Or does it have to be installed within a project collection scope, so that all projects created within the collection will have the extension?

Question 2: Is it possible to then have the settings for the extension via Data Storage saved within a project scope, not just a project collection or user scope? The only way I could think of working around this is to grab all users within a project, and then for each user, setting the document with data that should be saved? What if a user is part of multiple projects? This doesn't seem like a reasonable option.

NOTE: I was thinking about it and realized a better solution would be to have a document for each project, so then a document with an id of 1 would have the branches for a specific project, document with an id of 2 would have branches for a different project. Does this seem reasonable?


Solution

    1. No, the extension can’t be installed per to team project, it has to be installed within a project collection scope.
    2. No, the data storage can be scoped to either the Project Collection or User, can’t be project scope.

    More information, you can refer to Data storage