I new to TFS and VSTS and created a plugin for VSTS and TFS which contribute to work item group and hub group. Its works fine for VSTS but in TFS 2017 update2 it is not showing custom page for work item. Code which is used by me.
"contributions": [
{
"id": "custom-sample-work-item-form-page",
"type": "ms.vss-work-web.work-item-form-page",
"description": "Adds Execution Result to the Work Item form group",
"targets": [
"ms.vss-work-web.work-item-form"
],
"properties": {
"name": "My Custom Page",
"uri": "index.html",
"height": 600
}
},
What is the root cause for this?
It's only applied to VSTS by installing the extension directly. See Configure contributions in work item form.
So ,for TFS on-premise, you need to add an extension tag in the specific work item definition (xml) file.
Export the work item definition file :
witadmin exportwitd /collection:CollectionURL /p:Project /n:TypeName /f:FileName
Open the xml file and find your extension ID in the "Work Item Extensions" section
Add an extension tag below the "Work Item Extensions" section as shown below to make your extension available to the work item form.
<Extensions> <Extension Id="example.color-control-dev" /> </Extensions>
Save and import this .xml file.
witadmin importwitd /collection:CollectionURL /p:Project /f:FileName
See Add extensions in work item form via work item type definition xml for details.
UPDAET:
If you need to add the tab for all the work item types, you can create a script to export/import the definition xml files. Also bulk add the extension tag with text editor such as Notepad++.
For example:
...