Saturday, July 7, 2018
After receiving several questions about my previous post about Meeting the TFS Aggregator I decided to go deeper in this topic with a new post.
The idea is to expose some common use cases and their implementation for them that are getting started.
Before reading the post I highly recommend reading the official documentation to understand the syntax basics.
Let's implement the following use cases:
Update PBI state to "Committed" when any child gets moved to "In Progress"
Update PBI state to "Done" when all childrens get moved to "Done" or "Removed"
Set a "calculated" field in a Task
Create new work items and links
Friday, February 2, 2018
A couple of months ago I started to write a Powershell Module to use the TFS Rest API from Powershell scripts. You can find and download it from GitHub.
I personally use it for builds, releases and for integration/automation tools. The module helps me to create a much cleaner, shorter and easier scripts to interact with TFS/VSTS. Most of the functions works for TFS 2015.3 and above (including VSTS) but there are a couple of functions (lock git branch for example) that were introduced in later versions.
The module is strongly documented and each function has a detailed explanation about...
Monday, June 5, 2017
Let’s see some tips to avoid the excessive growth of the database if you are using Git in TFS...
Keep in mind that in Git-TFS there is not “git gc” implemented in the server side
This means that once you push a change to the database it will remain in the database forever (yes, forever). The only way to remove it is to delete the whole repository
Nevertheless this fact allows us to recover at any moment any thing that we have deleted (see how here)
Avoid to push the same...
Monday, May 29, 2017
In Git TFS there is not “git gc” implemented in the server side. At first sight this can be a big problem because once you push a change to the database it will remain in the database forever (yes, forever). The only way to remove it is to delete the whole repository. Nevertheless this fact allows us to recover at any moment any thing that we have deleted. Let’s see how achieve this…
1) Get the Internal Repository ID:
SELECT Name, InternalRepositoryId
ORDER BY InternalRepositoryId
2) Search the deleted branch in the reflog using the following query:
Tuesday, January 24, 2017
(First of all it’s important to make clear that this technique is not supported by Microsoft so PLEASE DON’T TRY THIS AT PRODUCTION)
It’s quite common in medium and big companies to have a TFS test environment to safely test plugins, test third party tools and show customizations before implementing them in production environment.
However, because the test server is an exact copy of the production it may happen that we unintentionally perform the tests on the wrong server (in fact the only difference between them is the url so is easy to get wrong). So, how can we avoid this...
Many times we have the need to store our project in GitHub because we want (or need) to be open source but still want to keep the capabilities offered by TFS/VSTS. Other times we need to give access to our repository to a person who can’t have (or that we don’t want to give) access to our TFS/VSTS server.
In these cases we can resolve the problem synchronizing our TFS/VSTS repository with our GitHub (public or private) repository. At first glance it may sound like a complicated process but it’s easier than you expect.
You can perform the synchronization manually (using pull/push)...