But it works on my PC!

The random thoughts of Richard Fennell on technology and software development

8. February 2012 10:23
by Richard Fennell
2 Comments

Speaking on the 15th Feb at the NE Bytes user group on “TFS for Everyone”

8. February 2012 10:23 by Richard Fennell | 2 Comments

I will be speaking at the NE Bytes user group next Wednesday (the 15th of Feb) on ‘TFS for Everyone’.

This a session based on the guest blog post on the UK Visual Studio blog  I did on how TFS is not just for .NET developers. It can be used from a whole range of development platforms and operating systems. I will be including demos using Eclipse and Ubuntu.

Hope to see you there.

4. February 2012 10:28
by Richard Fennell
0 Comments

Filtering in MDX Calculated Members

4. February 2012 10:28 by Richard Fennell | 0 Comments

BI development is not something I do that often, but from time to time you need to develop a custom report in TFS. I recently had to battle a MDX problem that someone who does more BI development I am sure why have had no issue with; but as with most of these blog posts (or my long term memory as I think of it) I thought it worth a post in case it helps anyone else

What I was trying to do was produce a table, as shown below, that would allow me to report for a project on the total estimated time in the requirements work items (an estimate made in the requirements planning phase of the project), the total original estimate in the tasks work items (the estimate made by the developers during iteration planning) and compare both with the actual completed time from the task work items.

Project Estimated Effort (from Requirements) Estimated Effort (from Task) Actual Effort (from Tasks)
Proj A 10 11 12
Proj B 15 14 21
Proj C 23 20 24
Proj D 9 10 10

 

The problem is that in the TFS warehouse both the requirement and task work item estimate in stored in the

[Measures].[Microsoft_VSTS_Scheduling_OriginalEstimate]

measure. In the MDX query I needed to add a pair of calculated measures that would filter for the two work item type.

This is where I stumbled, should I use IIF() or FILTER(). So I tried both. However, working in Report Builder 3 neither seemed to work. I seemed to end up with either an empty column or not filtering at all and showing the sum of all the work items estimates irrespective of the filter.

The first tip is stop work in Report Builder, this is great for making the report look good, but not the best for resolving MDX issues. Use the query tool within SQL Management Studio. As soon as I did this I saw some of my efforts were returning #Err. This explained my empty columns, Report Builder seemed to just swallow the #Err and give me an empty column.

A a bit more digging I found the form that did what I needed, and ended up with the following form for the MDX in the calculated measures

MEMBER [Measures].[EstimatedWorkForTasks] AS '([Measures].[Microsoft_VSTS_Scheduling_OriginalEstimate], [Work Item].[System_WorkItemType].[Task])'

By editing the MDX in SQL Management Studio it was fair quicker to develop and debug

image

Once I was happy with the MDX, I could cut and pasted it back into Report Builder and fix the layout of the report. And all without using either IIF() or FILTER().

2. February 2012 09:51
by Richard Fennell
0 Comments

Update released to fix issue for TFS 2010 with SQL Enterprise Page Compression

2. February 2012 09:51 by Richard Fennell | 0 Comments

Brian Harry has just posted on his blog about a bug in SQL page compression (found in SQL Enterprise) that can cause problems with TFS 2010 or TFS1(preview), previous version of TFS did not support page compression.

So if you are using TFS and SQL Enterprise have a read and make sure the correct updates are in place.

31. January 2012 12:43
by Richard Fennell
0 Comments

Have you tried switching it on and off again? Go on be aggressive!

31. January 2012 12:43 by Richard Fennell | 0 Comments

We have been building ‘standard’ environments for our TFS Lab Management system. Environments that can be used for most of the projects we are involved in without too much extra setup e.g. a small domain controller VM and a Server VM with SQL and SharePoint. These environments have a series of snapshots so it can be used in a number of ways e.g if we just want SQL and IIS we just go back to a snapshot prior to SharePoint being installed.

When trying to deploy one of these environments we saw a couple issues.

Capacity

First we got the error that there was not a suitable host with enough capacity to host the environment (remember all the VMs in a network isolated environment need to be on the same Hyper-V host). This can be a bit of a red herring as with dynamic memory and other new Hyper-V features there is often the capacity there (see Tiago’s post on this for more details). The fix here was to set TFS to allow aggressive deployment using the command

C:\Program Files\Microsoft Team Foundation Server 2010\Tools>tfsconfig lab /hostgroup /collectionName:myTpc  ​/labenvironmentplacementpolicy:aggressive /edit /Name:"My hosts group"

Initial Startup

The next problem I saw was that when the new environment was deployed it did not started cleanly. The first time an environment is started it seems to take longer than subsequent starts (assume there is some initial configuration done). Basically in this case network isolation did not start correctly, hence build and testing capabilities also failed.

The fix was simple, shut down the environment and start it again. The tried and trusted IT answer to all problems. This time it started fine, and was faster to start.

Now I have not see this issue every time I deploy. When I deployed the same environment again and it worked perfectly first time. I suspect it was really a capacity issue on the underlying Hyper-V server causing some delay, but I am running in aggressive mode so I should expect this.

26. January 2012 19:30
by Richard Fennell
0 Comments

Links from our SDL event today

26. January 2012 19:30 by Richard Fennell | 0 Comments

Thanks to everyone who attended our SDL event today. Here are a few links to information  we mentioned