如何在本地Azure DevOps 2019中更改工作项图标 [英] How to change work item icons in on-premise Azure DevOps 2019

查看:88
本文介绍了如何在本地Azure DevOps 2019中更改工作项图标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

正如标题所述,如何更改工作项的图标?目前,它们都是蓝色的剪贴板,上面有一个勾号,在查看项目门户中的某些列表时,我想更轻松地区分错误,任务和用户故事.该项目集合是最近从TFS2012导入的,如果有区别的话.我认为它们最初是"MSF for Agile" 5.0或6.2进程.

在相关说明中,如何确定特定项目正在使用哪个进程?可以更改吗?

修改尽管有文档说该页面不适用于本地,但我仍可以转到集合的处理"页面(在菜单中木板"标题下).但是,这里列出的所有流程都不是可单击的链接,这似乎是执行诸如更改项目流程之类的功能的关键.为什么会这样?

编辑2 根据要求添加了@ PatrickLu-MSFT的屏幕截图.第一个显示分配给我的工作项(注意,尽管有些WI是错误的,而其他任务却是相同的蓝色图标).我没有在屏幕快照

解决方案

这可以做到:

打开VS 2019控制台会话的 Developer命令提示符并运行以下命令:

witadmin exportprocessconfig/collection:http://{server_url}/{collection_name}/p:{project_name}/f:c:\temp\ProcessConfiguration.xml

编辑刚刚导出的文件.找到< Properties> 部分,并添加以下行(

在结束的< Properties> 元素之后,添加以下行:

 < WorkItemColors>< WorkItemColor primary ="FFCC293D";secondary ="FFFAEAE5"name =臭虫"/>< WorkItemColor primary ="FFB4009E";secondary ="FFFCEECF"name =代码审查请求";/>< WorkItemColor primary ="FFB4009E";secondary ="FFFCEECF"name =代码审查回复"/>< WorkItemColor primary ="FFFF7B00";secondary ="FFFFD7B5"名称=史诗"/>< WorkItemColor primary ="FF773B93";secondary ="FFEEE2F2"名称=功能"/>< WorkItemColor primary ="FF004B50"secondary ="FFFCEECF"name =反馈请求"/>< WorkItemColor primary ="FF004B50"secondary ="FFFCEECF"name =反馈响应"/>< WorkItemColor primary ="FFB4009E";secondary ="FFFCEECF"name =问题"/>< WorkItemColor primary ="FF004B50"secondary ="FFFCEECF"name =共享参数";/>< WorkItemColor primary ="FF004B50"secondary ="FFFCEECF"name =共享步骤"/>< WorkItemColor primary ="FFF2CB1D";secondary ="FFF6F5D2"名称=任务"/>< WorkItemColor primary ="FF004B50"secondary ="FFFCEECF"name =测试用例"/>< WorkItemColor primary ="FF004B50"secondary ="FFFCEECF"name =测试计划"/>< WorkItemColor primary ="FF004B50"secondary ="FFFCEECF"名称=测试套件";/>< WorkItemColor primary ="FF009CCC"secondary ="FFD6ECF2"name =用户故事"/></WorkItemColors> 

保存文件,然后通过运行以下命令对其进行验证(请注意/v 参数):

witadmin importprocessconfig/collection:http://{server_url}/{collection_name}/p:{project_name}/f:c:\temp\ProcessConfiguration.xml /v

根据项目所使用的过程,您可能会看到类似以下的警告:

以下元素包含错误:属性.此元素定义此团队项目的属性."WorkItemTypeIcons"属性的值无效.VS403291:"Epic = icon_crown"对中的无效工作项类型.

如果看到此消息,则意味着您的项目过程不包含该特定工作项类型(在上例中为"Epic"),因此只需删除"key = value"键即可. WorkItemTypeIcons 元素的值"对中的一对(和逗号!).属性.

再次验证,然后重复直到不再出现此类错误为止.XML验证后,使用以下命令将其导入回DevOps:

witadmin importprocessconfig/collection:http://{server_url}/{collection_name}/p:{project_name}/f:c:\temp\ProcessConfiguration.xml

就是这样.下次在项目的Web门户中查看工作项时,您将看到新的图标优点.

更改项目流程我仍然不知道为什么我无法点击集合的所有流程"列表中列出的流程.页面,因为更改项目以使用较新的敏捷"网页要容易得多.而不是对每个步骤执行上述步骤.也许@ PatrickLu-MSFT可以阐明这一点.

As the title says, how can I change the icons of work items? Currently they are all a blue clipboard with a tick in it, and I would like to more easily distinguish between bugs, tasks, user stories when viewing certain lists in the project portal. The project collection was recently imported from TFS2012, if that makes a difference. I think they were originally "MSF for Agile" 5.0 or 6.2 processes.

On a related note, how can I tell which process a particular project is using? And can it be changed?

Edit I can get to the collection's "Process" page (under the "Board" heading in the menu), despite documentation saying that this page isn't available on-premise. However none of the processes listed here are clickable links, which seems to be the key for performing functions such as changing a project's process. Why is this?

Edit 2 Added screenshots for @PatrickLu-MSFT as requested. The first shows the work items assigned to me (note the same blue icon despite some WIs being bugs and others tasks). I don't see different icons/colours as seen in the screenshot here, step #6 under "Add a work item type".

The second image shows the Collection Settings -> Process page (which the MS doc'n suggests isn't accessible in an on-premise installation, unless I've misunderstood). Although I can access this page, the process names are not clickable links, which the MS doc'n shows as navigating to a page where you can perform actions such as change a project's process.

Note that if I create a new project in this collection and select the "Agile" process then I do see the different work item icons/colours, so the lack of icons/colours seems to be simply due to the existing projects' processes not supporting such a feature, as they were migrated from TFS2012 where they would have used the "MSF for Agile" 5.0 or 6.2 process. Now if only there was a way to unlock the above feature to let me change the project processes...

解决方案

This can be done:

Open a Developer Command Prompt for VS 2019 console session and run this command:

witadmin exportprocessconfig /collection:http://{server_url}/{collection_name} /p:{project_name} /f:c:\temp\ProcessConfiguration.xml

Edit the file you just exported. Locate the <Properties> section and add this line (ref):

<Property name="WorkItemTypeIcons" value="User Story=icon_book,Feature=icon_trophy,Epic=icon_crown,Task=icon_clipboard,Bug=icon_insect,Code Review Request=icon_code_review,Code Review Response=icon_code_response,Feedback Request=icon_review,Feedback Response=icon_response,Issue=icon_traffic_cone,Shared Steps=icon_test_step,Test Case=icon_test_case,Test Plan=icon_test_plan,Test Suite=icon_test_suite,Shared Parameter=icon_test_parameter" />

After the closing <Properties> element, add these lines:

<WorkItemColors>
  <WorkItemColor primary="FFCC293D" secondary="FFFAEAE5" name="Bug" />
  <WorkItemColor primary="FFB4009E" secondary="FFFCEECF" name="Code Review Request" />  
  <WorkItemColor primary="FFB4009E" secondary="FFFCEECF" name="Code Review Response" />
  <WorkItemColor primary="FFFF7B00" secondary="FFFFD7B5" name="Epic" />
  <WorkItemColor primary="FF773B93" secondary="FFEEE2F2" name="Feature" />
  <WorkItemColor primary="FF004B50" secondary="FFFCEECF" name="Feedback Request" />
  <WorkItemColor primary="FF004B50" secondary="FFFCEECF" name="Feedback Response" />
  <WorkItemColor primary="FFB4009E" secondary="FFFCEECF" name="Issue" />
  <WorkItemColor primary="FF004B50" secondary="FFFCEECF" name="Shared Parameter" />
  <WorkItemColor primary="FF004B50" secondary="FFFCEECF" name="Shared Steps" />
  <WorkItemColor primary="FFF2CB1D" secondary="FFF6F5D2" name="Task" />
  <WorkItemColor primary="FF004B50" secondary="FFFCEECF" name="Test Case" />
  <WorkItemColor primary="FF004B50" secondary="FFFCEECF" name="Test Plan" />
  <WorkItemColor primary="FF004B50" secondary="FFFCEECF" name="Test Suite" />
  <WorkItemColor primary="FF009CCC" secondary="FFD6ECF2" name="User Story" />
</WorkItemColors>

Save the file then validate it by running this command (note the /v parameter):

witadmin importprocessconfig /collection:http://{server_url}/{collection_name} /p:{project_name} /f:c:\temp\ProcessConfiguration.xml /v

Depending on the process in use by the project, you may see warnings like this:

The following element contains an error: Properties. This element defines the properties for this team project. The value of the 'WorkItemTypeIcons' property is invalid. VS403291: Invalid work item type in pair 'Epic=icon_crown'.

If you see this, it means your project process doesn't contain that particular work item type ("Epic" in the above example), so simply remove the "key=value" pair (and comma!) from the WorkItemTypeIcons element's "value" attribute.

Validate again, and repeat until there are no more such errors. Once the XML validates, import it back into DevOps using this command:

witadmin importprocessconfig /collection:http://{server_url}/{collection_name} /p:{project_name} /f:c:\temp\ProcessConfiguration.xml

And that's it. You'll see the new icon goodness next time you view work items in your project's web portal.

Changing project process I've still no idea why I can't click into the processes listed on the the collection's "All Processes" page, as it would have been far easier to change the projects to use the newer "Agile" process instead of performing the above steps for each one. Perhaps @PatrickLu-MSFT can shed some light on that.

这篇关于如何在本地Azure DevOps 2019中更改工作项图标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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