VSTS扩展数据存储在项目范围级别 [英] VSTS Extension Data Storage on Project Scope Level

查看:81
本文介绍了VSTS扩展数据存储在项目范围级别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经成功创建了带有工作项目页面扩展名的设置页面,该页面可以自动生成工作项目上的dev,doc,qa和testware任务.设置页面用于修改可以为其生成任务的分支("6.14","6.15"等).该扩展程序使用数据存储客户端服务API,当前将设置保存在项目集合级别.我要做的是让扩展程序的设置对于安装扩展程序的每个项目都是唯一的.

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.

问题1:可以在每个项目的基础上安装扩展吗?还是必须将其安装在项目集合范围内,以便集合中创建的所有项目都具有扩展名?

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?

问题2:是否可以通过数据存储将扩展设置保存在项目范围内,而不仅仅是项目集合或用户范围内?我能想到的解决此问题的唯一方法是,抓住一个项目中的所有用户,然后为每个用户使用应保存的数据设置文档?如果用户属于多个项目怎么办?这似乎不是一个合理的选择.

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.

注意:我正在考虑这一点,意识到更好的解决方案是为每个项目都有一个文档,因此,一个ID为1的文档将具有一个特定项目的分支,而ID为2的文档将具有有不同项目的分支机构.这看起来合理吗?

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?

推荐答案

  1. 否,该扩展程序无法针对团队项目进行安装,必须在项目收集范围内安装.
  2. 否,数据存储范围可以是项目集合"或用户",而不能是项目范围.

更多信息,您可以参考数据存储

More information, you can refer to Data storage

这篇关于VSTS扩展数据存储在项目范围级别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆