Coder Social home page Coder Social logo

process-customization-scripts's Introduction

Process Customization Scripts

These scripts are designed to automate the exporting and importing of your TFS process templates.


Export

If you are using these script to help you with TFS Data Import, we suggest you use the tfsMigrator validate .. /saveprocesses command to export your processes.

Example

tfsMigrator validate "http://myServer/tfs/DefaultCollection" /saveprocesses

The ExportProjectsTemplate.ps1 will connect to your TFS or VSTS project and extract the process template.

Folder Structure

Root Folder --- Default_EmptyTemplate --- Exported Templates --- ExportProjectTemplate.ps1

Default_EmptyTemplate

The folder contains series of files and folders that are needed when extracting the process template from the project. Don't change anything in this folder.

ExportedTemplates

This is where your process template will be stored after the script run is completed. The PowerShell script specifically looks for this folder.

ExportProjectTemplate.ps1

PowerShell script that extracts the process from the project and saves it into the ExportedTemplates folder

Syntax

./ExportProjectTemplate.ps1 "collection" "projectname" -true

Example

.\ExportProjectTemplate.ps1 "http://myServer/tfs/DefaultCollection" "foo" -force

Note: You will need to run the ExportProjectTemplate.ps1 script for each project


Import

ConformProject.ps1 will take a defined process template that is on your local machine and apply it, in full, to a specified project. Typical use case for this is to update to the most recent OOB Agile, Scrum, or CMMI template. You may also be a large organization that has made a change to process and need to apply it many projects within your collection.

Process Template (Agile, Scrum, Customized)

You will need the entire process template downloaded in a location you can get access it via your desktop. When executing the script you supply the full path to this folder

ConformProject.ps1

PowerShell script that runs a takes a process template path and runs a series of witadmin commands to apply it to a supplied project.

Syntax

./ConformProject.ps1 "collection" "projectname" "templatepath"

Example

./ConformProject.ps1 "http://myServer/tfs/DefaultCollection" "foo" "c:\folder\agile"

Misc

use getprojects.ps1 to get a list or projects from a collection using the REST API's. You can also get the full list of projects from your TFS collection database by using the following sql:

Select * from tbl_projects where State = 'WellFormed' and PartitionId > 0

Support

Contact [email protected] with questions or issues

process-customization-scripts's People

Contributors

danhellem avatar jeremymorel avatar lukeschlather avatar microsoft-github-policy-service[bot] avatar msftgits avatar omarv74 avatar pietergheysens avatar raoulholzer avatar rlvandaveer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

process-customization-scripts's Issues

Error During Export

I’m attempting to use the export script, so that I may save my painstakingly crafted customizations for backup/recovery purposes.

However, I’m encountering an error:

The feature is disabled. Contact your Azure DevOps Server administrator.

I’m running this script against my on-prem Azure DevOps Server 2022 collection, which is using the Inherited process template.

Project export failed error

I was trying this script to export templates from an on-prem TFS collection. I am able to export templates from one project but unable to do that from another project in the same collection.

Getting "Project export failed" after the Step1 output.

Please help!

Add Import/Export FieldMapping.xml

This likely also doesn't apply to the VSTS, but this can be done with
Export

TfsFieldMapping  download /collection:$CollectionUrl /teamproject:"$ProjectName" /mappingfile:"$tempFile"

Import

tfsFieldmapping  upload /collection:$CollectionUrl /teamproject:"$ProjectName" /mappingfile:"$outPath"

Similar logic to the witadmin.exe lookup would need to be added, so i'll see if you're interested in this before PR'ing something.

witadmin.exe path issues

There are two separate issues with the path logic.

  1. When witadmin.exe is in the path, Test-Path will fail, so it will still throw even though it's valid and can do the work.

  2. In 32-bit PowerShell processes, $env:ProgramFiles resolves to C:\Program Files (x86), so $VSDirectories is built with the wrong path.

Multiple template failures due to: The 'refname' attribute is not declared.

Are these templates for TFS2015, or TFS2018? If they're TFS2015, then they are absolutely useless when performing upgrades. FYI, the official Microsoft documentation points to this repo:

https://docs.microsoft.com/en-us/vsts/articles/migration-processtemplates?view=vsts

Here is the results when I try to force a project to be Agile:

Unable to find witadmin.exe on your path. Attempting VS install directories
Testing for C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\witadmin.exe
Testing for C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\witadmin.exe
Testing for C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\witadmin.exe
Testing for C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\witadmin.exe
Step 1: Preparing Conform
Operation Complete
Step 1: Complete
Step 2: Validating Work Items
Work Item Type SharedStep.xml missing from the project, it will be added in Step 5
Step 2: Complete
Step 3: Conform project - Link Types
Importing Link Type: SharedParameterLink.xml
The link types were imported successfully.
Importing Link Type: SharedStep.xml
The link types were imported successfully.
Importing Link Type: TestedBy.xml
The link types were imported successfully.
Step 3: Complete
Step 4: Conform project - Type Definitions
Importing Work Item Type: Bug.xml
TF212019: Work item tracking schema validation error at row 3, column 28: The 'refname' attribute is not declared.
TF212019: Work item tracking schema validation error at row 861, column 8: The element 'FORM' has invalid child element 'WebLayout'. List of possible elements expected: 'Layout'.
TF237070: Importing the definition failed. The definition you are trying to import did not validate against the schema. Edit the definition, then try to import it again.
Importing Work Item Type: CodeReviewRequest.xml
TF212019: Work item tracking schema validation error at row 3, column 44: The 'refname' attribute is not declared.
TF212019: Work item tracking schema validation error at row 287, column 8: The element 'FORM' has invalid child element 'WebLayout'. List of possible elements expected: 'Layout'.
TF237070: Importing the definition failed. The definition you are trying to import did not validate against the schema. Edit the definition, then try to import it again.
Importing Work Item Type: CodeReviewResponse.xml
TF212019: Work item tracking schema validation error at row 3, column 45: The 'refname' attribute is not declared.
TF212019: Work item tracking schema validation error at row 327, column 8: The element 'FORM' has invalid child element 'WebLayout'. List of possible elements expected: 'Layout'.
TF237070: Importing the definition failed. The definition you are trying to import did not validate against the schema. Edit the definition, then try to import it again.
Importing Work Item Type: Epic.xml
TF212019: Work item tracking schema validation error at row 3, column 29: The 'refname' attribute is not declared.
TF212019: Work item tracking schema validation error at row 511, column 8: The element 'FORM' has invalid child element 'WebLayout'. List of possible elements expected: 'Layout'.
TF237070: Importing the definition failed. The definition you are trying to import did not validate against the schema. Edit the definition, then try to import it again.
Importing Work Item Type: Feature.xml
TF212019: Work item tracking schema validation error at row 3, column 32: The 'refname' attribute is not declared.
TF212019: Work item tracking schema validation error at row 511, column 8: The element 'FORM' has invalid child element 'WebLayout'. List of possible elements expected: 'Layout'.
TF237070: Importing the definition failed. The definition you are trying to import did not validate against the schema. Edit the definition, then try to import it again.
Importing Work Item Type: FeedbackRequest.xml
TF212019: Work item tracking schema validation error at row 3, column 41: The 'refname' attribute is not declared.
TF212019: Work item tracking schema validation error at row 215, column 8: The element 'FORM' has invalid child element 'WebLayout'. List of possible elements expected: 'Layout'.
TF237070: Importing the definition failed. The definition you are trying to import did not validate against the schema. Edit the definition, then try to import it again.
Importing Work Item Type: FeedbackResponse.xml
TF212019: Work item tracking schema validation error at row 3, column 42: The 'refname' attribute is not declared.
TF212019: Work item tracking schema validation error at row 207, column 8: The element 'FORM' has invalid child element 'WebLayout'. List of possible elements expected: 'Layout'.
TF237070: Importing the definition failed. The definition you are trying to import did not validate against the schema. Edit the definition, then try to import it again.
Importing Work Item Type: Issue.xml
TF212019: Work item tracking schema validation error at row 3, column 30: The 'refname' attribute is not declared.
TF212019: Work item tracking schema validation error at row 250, column 8: The element 'FORM' has invalid child element 'WebLayout'. List of possible elements expected: 'Layout'.
TF237070: Importing the definition failed. The definition you are trying to import did not validate against the schema. Edit the definition, then try to import it again.
Importing Work Item Type: SharedParameter.xml
TF212019: Work item tracking schema validation error at row 3, column 41: The 'refname' attribute is not declared.
TF212019: Work item tracking schema validation error at row 171, column 8: The element 'FORM' has invalid child element 'WebLayout'. List of possible elements expected: 'Layout'.
TF237070: Importing the definition failed. The definition you are trying to import did not validate against the schema. Edit the definition, then try to import it again.
Importing Work Item Type: SharedStep.xml
TF212019: Work item tracking schema validation error at row 3, column 37: The 'refname' attribute is not declared.
TF212019: Work item tracking schema validation error at row 248, column 8: The element 'FORM' has invalid child element 'WebLayout'. List of possible elements expected: 'Layout'.
TF237070: Importing the definition failed. The definition you are trying to import did not validate against the schema. Edit the definition, then try to import it again.
Importing Work Item Type: Task.xml
TF212019: Work item tracking schema validation error at row 3, column 29: The 'refname' attribute is not declared.
TF212019: Work item tracking schema validation error at row 395, column 8: The element 'FORM' has invalid child element 'WebLayout'. List of possible elements expected: 'Layout'.
TF237070: Importing the definition failed. The definition you are trying to import did not validate against the schema. Edit the definition, then try to import it again.
Importing Work Item Type: TestCase.xml
TF212019: Work item tracking schema validation error at row 3, column 34: The 'refname' attribute is not declared.
TF212019: Work item tracking schema validation error at row 343, column 8: The element 'FORM' has invalid child element 'WebLayout'. List of possible elements expected: 'Layout'.
TF237070: Importing the definition failed. The definition you are trying to import did not validate against the schema. Edit the definition, then try to import it again.
Importing Work Item Type: TestPlan.xml
TF212019: Work item tracking schema validation error at row 3, column 34: The 'refname' attribute is not declared.
TF212019: Work item tracking schema validation error at row 143, column 8: The element 'FORM' has invalid child element 'WebLayout'. List of possible elements expected: 'Layout'.
TF237070: Importing the definition failed. The definition you are trying to import did not validate against the schema. Edit the definition, then try to import it again.
Importing Work Item Type: TestSuite.xml
TF212019: Work item tracking schema validation error at row 3, column 35: The 'refname' attribute is not declared.
TF212019: Work item tracking schema validation error at row 189, column 8: The element 'FORM' has invalid child element 'WebLayout'. List of possible elements expected: 'Layout'.
TF237070: Importing the definition failed. The definition you are trying to import did not validate against the schema. Edit the definition, then try to import it again.
Importing Work Item Type: UserStory.xml
TF212019: Work item tracking schema validation error at row 3, column 35: The 'refname' attribute is not declared.
TF212019: Work item tracking schema validation error at row 545, column 8: The element 'FORM' has invalid child element 'WebLayout'. List of possible elements expected: 'Layout'.
TF237070: Importing the definition failed. The definition you are trying to import did not validate against the schema. Edit the definition, then try to import it again.
Step 4: Complete
Step 5: Conform project - Categories
The category import has completed.
Step 5: Complete
Step 6: Conform project - Process Configuration
Microsoft (R) Work Item Tracking Administration tool.
Copyright (c) Microsoft Corporation. All rights reserved.
TF212001: importprocessconfig is not a witadmin command. Type 'witadmin' and press Enter for a list of commands.
Step 6: Complete
Project 'Client Projects' conforms to the template

Path to witadmin is limited to Enterprise version only.

I installed Visual Studio 2017 Team Viewer (as recommended on the website) and it couldn't find it. I also installed Visual Studio 2017 Professional (according to my MSDN license) and it couldn't find it. Once I change the word "Enterprise" to "Professional" it worked like a charm. Would a PR that adds checks in multiple tiers be welcomed in this case?

https://github.com/Microsoft/process-customization-scripts/blob/837816848374c4b8ef7802c4d790a95a0482026f/Import/ConformProject.ps1#L26-L31

upadate xml

can you apdete new xml files, because thes file is to old

Help with ADO process-customization-scripts

Hello,

Sorry if this is not the appropriate forum to solicit help.
The listed '[email protected]' for support appears to be an undeliverable address.

I am testing out a migration from ADO_2020.1.2 (on-prem) to ADO-Cloud in a VM clone.
(The ADO/TFS cloned VM has been properly separated from production via the install wizard. It was originally upgraded from TFS_2017_update3.)

I am attempting to manually resolve ‘migrator validate’ issues with custom templates per online documentation for resolving migration errors. The documentation recommends using the ‘process-customization-scripts’ to validate and apply the fixes.

I installed Visual Studio 2022 Community to access to the required ‘witadmin’ tool.

I have modified a copy of the output template directory hierarchy from the ‘migrator validate’ saved process output, minus the included project zip bundles.
Then, I run ‘conformproject.ps1’ to apply the changes.
The script appears to run successfully for the various projects, after fixing some additional issues.
However, the templates never seem to actually be applied to the ADO server.
Re-running the ‘migrator validate’ shows the same errors again.
I have tried these steps many times, while resolving errors in the template files.
But, the changes never seem to be applied.

Can someone offer any advice about applying the template fixes?
Is the ADO_2020.1.2 or “witadmin from VS 2022” not compatible with the conform script?

Thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.