How to secure an external Vendors Access to VSTS/TFS

A lot of customers I work with have external vendors. They would like those vendors to have their own backlog of work we can assign to them. However they don’t want them to be able to see all the other work items, and sometimes Builds or Releases.

You can use Stakeholder access level. But sometimes that is too restrictive.

If you want them to have Basic or better access but limit their view.

  • Create a Team for the vendor and add all vendor resources to the team. If they don’t need a backlog and will just run queries for their work. you can just create a Group instead of a Team.
  • Make sure someone at your company is the team administrator.
  • From the Team project navigate to Control Panel -> Work -> Areas
  • Select the Main node in the Areas that is named after the Team Project
  • From the ellipsis context menu select security
  • Add the Team to this dialog and select Deny for all the items in the list

image

  • Save changes
  • Navigate to the node you want this vendor to be able to access work items for and select security
  • Select the External Vendor Group

image

  • Change their permissions for Edit work items in this node and View work items in this node to Allow.
  • Now this group can only see work items under the Area External Vendor

To make sure they can’t see Builds and Releases.

  • Navigate to Builds and click on the Security button at the top of the build list.
  • Set View Build definition and View Builds to Deny
  • For releases navigate to Releases and click the ellipses next to All Release definitions
  • Set View release definition and View release to Deny

image

image

@CurrentIteration Just got smarter

@CurrentIteration was a long awaited feature in TFS/VSTS. It was very exciting when it came along and we could create queries that would work sprint after sprint without having to update at the start of each sprint.

Now they just got better, @CurrentIteration now takes parameters. Pass it a Team to get the current iteration for that team. Which also gives us the ability to reference different current iterations in the same query. And finally, you can now query for past or future iterations just by including +n or –n.

Check out Lauren Brose’s blog for all the details.

@mentions in VSTS/TFS

I find a lot of people don’t know about @mentions. @mentions allows you to bring someone into the conversation around a work item.  All you have to do is type an at symbol “@” into the discussion field.

Once you start typing the user search will appear similar to when you start typing a user name into the assigned To field.

image

Once you find the person that you want to bring into the conversation you just mention them in the Discussion field.

image

The person you mentioned will receive an email letting them know they were mentioned.

image

You can read all about it here.

CI\CD with SQL Server

I did a presentation back in the spring at my user group TALMUG on SQL Server Data Tools. I enjoyed it so much I am doing it at 3 other user groups.

Canadian Technology Triangle .Net User Group  ‎November‎ ‎22‎, ‎2017

North Toronto .net user Group January 10, 2018

Toronto .Net Meetup February 28, 2018

If you want to learn how to work with SSDT and create a CICD pipeline for your SQL Server Database come on out to one of these meetups.

VSTS Compare Excel Spread Sheets

I have many customers who keep spread sheets in version control for various reasons. Why they do it is not the purpose of this post. The point is about using the Compare feature in TFS/VSTS on Excel Spread sheets. I recently discovered an easy way to compare the difference between two spread sheets, and how to hook that up to Visual Studio so I could right click compare right from Team Explorer.

This is for Office 2016. You can do it for older versions however the location of SpreadSheetCompare.exe may be different.

Here is the trick:

Write a batch file that writes the file names of the two files you want to compare to another file. Then call SpreadSheetCompare.exe passing in the file containing the two file names.

dir %1 /B /S > c:\temp\temp.txt 
dir %2 /B /S >> c:\temp\temp.txt 
"C:\Program Files (x86)\Microsoft Office\Root\Office16\DCF\SPREADSHEETCOMPARE.EXE" "c:\temp\temp.txt"

You can store the batch file in version control that way as long as the users get latest on this file they will have it locally. Or just give it to the people who want to do this and they can put it anywhere on their machine.

Hook this up to the Compare menu item in Team Explorer and VS: In Visual Studio open Tools –> Options, navigate to the “Source Control” section specifically “Visual Studio Team Foundation Server”. Open the “Configure User Tools…” dialog.

Add the .xlsx file extension calling your new batch file and passing in the two files to compare (default behaviour).

image

Now when you right click compare an Excel spread sheet in version control you will launch the SpreadSheetCompareTool that comes with office.

The link is to a video showing that. Which I tried to imbed in my blog but there are issues apparently that I don’t have time to research right now.

VSTS/TFS Pipelines

One of my clients just did some stats for their management team.

In 2017 the teams at this client ran 6000+ Builds and 2000+ automated Releases. It really shows just how much TFS has become a part of their Application Lifecycle.

What is more impressive is that these are not just .NET apps. These builds and releases include technologies such as .NET, SQL Server Databases, Neuron (ESB), Dynamics CRM, SSIS, Duck Creek Technologies, GMC, Master Data Services, SharePoint and some I can't recall right now. It's a great story of TFS getting the job done in a not totally Microsoft environment.

So when someone tells you “We don't use VSTS/TFS because we are not a Microsoft shop”. Ask them what that has to do with it and share this story with them.

Two times I #HitRefresh

I’ve been an independent, consultant since 1993. Which means it’s coming up to the 25th anniversary of the first time I #HitRefresh on my career. At that time I was working as an employee with a fairly large data centre in the financial industry, primarily writing teller systems in C for the Credit Unions of Ontario. At this time these systems ran on DOS and OS\2. I #HitRefresh by moving into the consulting world building applications for Windows written in PowerBuilder.

The second time I #HitRefresh was around 2000 when I latched onto the .net wave and learned C# and the .net framework. Along with many other new and exciting tools. Most important to me Team Foundation Server.

This was a big change from the world I had become accustomed. My friend and colleague Barry Gervin and I started speaking at user groups, attending the PDC conferences and going to each others house once a week to teach each other different parts of the .net framework. We eventually started a company that helped out customers adopt this technology. That was the beginning of ObjectSharp Consulting. We offered consulting and training. Some of that training we authored, and some was Microsoft Official Curriculum.

Although there have been many #HitRefresh moments in my career this was the biggest one. I am sure there will be more. Looking back it amazes me how this industry has changed since the mid 80’s when I began writing code. 

This post is part of a series of #HitRefresh moments. Read more at www.HitRefreshbook.com.

Quick and easy custom filtered burn downs

Today I am going to show you how to create quick little burn down charts right off of a work item query.

As you may well know the burn down chart in TFS is based on the remaining work field in the task work item. It queries all the tasks in the corresponding iteration and shows how the remaining work changes each day during the iteration.

This is great if you are a scrum team, it's all you need to know.

I have a lot of customers that use TFS that are not using Scrum or are even that agile. However they love the idea of a burn down report. However they want to see it with different filters applied.

Perhaps by individual or by activity or Area Path. Remember not everyone follows the agile manifesto 100%. Don’t judge. :)

Back to our quick burn downs.

First we need to create a work item query that defines the scope of our burn down. Since it’s a query and not the iteration backlog we can grab any tasks we want we can create a burn down that crosses teams and iterations.

So lets keep it simple for now and create a query that gets all the tasks for the current iteration.

image

Now add the a few columns to the query. We’ll need Remaining Work since that is the key to our Burn Down. Lets also grab Activity, Area Path and Assigned To for our example

image

Now over to the Charts section of the query. (Make sure you have saved the query so you can make a chart.)

Create a new chart and select a Line Trend report.

Under Values change Count to Sum and select Remaining Work as the field to Sum.

Pick your Rolling period. This is how far back you want to start the burn down.

Now select your Group By field. This is where you can define if you want to see the burn down by Activity or Team Member or Area Path.

image

There is no projection beyond today or an ideal trend line, but I am sure you can visualize that.

With charts you can make a bunch of these, each with their own “group by” field to augment the burn down for your teams iteration.  

Writing to the Build Report in TFS 2015

This is a cool trick for writing something directly onto the build report. 

As an example I will write out the heading “ObjectSharp” and under it I’ll put the website. So it will come out looking like this.

image

 

 

 

 

 

 

 

 

 

 

 

The syntax follows this format:

##vso[area.action property1=value;property2=value;...]message

For more examples and syntax look here. For my example I simply added an inline Powershell task. With the following powershell.

$TempFile = [System.IO.Path]::GetTempFileName()
$fullurl = "http://www.ObjectSharp.com" | set-content $Tempfile
Write-Host "##vso[task.addattachment type=Distributedtask.Core.Summary;name=ObjectSharp;]$Tempfile" 

How would I use this. In the past I have used it to write code metric results to the build report. I have also used it to write the URL to a location in Nexus Package Manager where a build artifact was uploaded ready for deployment.

Global Azure BootCamp

GLOBAL AZURE BOOTCAMP

On Saturday, April 22, 2017, communities across the world will be holding Azure Bootcamps. There are already 132 planned!

Here is a list of events happening in Canada: Calgary, Montreal, Ottawa, Quebec, Toronto, Vancouver