Getting Started with Adobe After Effects - Part 6: Motion Blur


Upload Image Close it
Select File

All about my Learnings & Experience on SQL Server, Business Intelligence (Microsoft BI) and Life...!!!
Browse by Tags · View All
- All Tech Articles - 22
SQL Server 10
T-SQL 5
About Me 5
Code Snippets 3
Data Profiling 2

Archive · View All
January 2012 5
March 2011 3
June 2011 3
December 2011 3
October 2011 3
February 2012 2
May 2011 2
July 2011 2
August 2011 2
March 2012 1

Datta's Ramblings on Business Intelligence 'N' Life

Applying Logical Operators in TFS Work Item Queries

Jun 9 2011 12:00AM by Dattatrey Sindol (Datta)   

Last day I was querying the work items in TFS to track the status of some of the work items. Usually I used to query the work items (Bugs, Tasks etc.) which are assigned to me. However, last day I needed to query the work items which are assigned to couple of other team members as well. I was able to easily add all the clauses in the query except for the "Assigned To" where I had to do a logical OR operator. Let's take a look at what my query looked like and how I got it working :)


So, basically I wanted the following output using the above query:

"List of all the Work Items which are Assigned To either of my 2 team members (2nd & 3rd Assigned To clauses in the above screenshot), which are not in a Closed State (They can be in Active, Resolved etc. states)".

Here is a pseudo code which is equivalent of the query in the above screenshot.

SELECT [All Types of Work Items]
FROM [One or More TFS Backend Database Tables]
WHERE
[Work Item Assigned To] = "1st Team Member"
OR [Work Item Assigned To] = "2nd Team Member"
AND [Work Item State] <> "Closed"

But I wanted my query to be something like this:

SELECT [All Types of Work Items]
FROM [One or More TFS Backend Database Tables]
WHERE
(
  [Work Item Assigned To] = "1st Team Member"
  OR [Work Item Assigned To] = "2nd Team Member"
)
AND [Work Item State] <> "Closed"


Now, as we can see that the output which I wanted as stated above, can be achieved using the above query. And as we can see that, the difference between the above two queries is the presence of brackets in the 2nd query which makes it logically correct.

But I was not able to achieve the equivalent of the 2nd query in TFS. After doing some research, I figured out that there is an option to Group Clauses in Work Item queries. Select the Clauses which you want to group (Hold shift key and select multiple clauses present one after the other in a sequence), right click and select Group Clauses from the context menu as shown below:


Once the clauses are grouped, then the TFS Work Item query looks something like this.


Now, in case we need to remove those brackets (grouping) then we just need to select the same set of clauses, right click and select Ungroup Clauses from the context menu as shown below.


It's as simple as that !!!

Reference: How to: Group or Ungroup Work Item Query Clauses on MSDN


Republished from Datta's Ramblings on Business Intelligence 'N' Life [21 clicks].  Read the original version here [2 clicks].

Dattatrey Sindol (Datta)
43 · 4% · 1333
1
 
0
Lifesaver
 
0
Refreshed
 
0
Learned
 
0
Incorrect



Submit

Your Comment


Sign Up or Login to post a comment.

"Applying Logical Operators in TFS Work Item Queries" rated 5 out of 5 by 1 readers
Applying Logical Operators in TFS Work Item Queries , 5.0 out of 5 based on 1 ratings
    Copyright © Rivera Informatic Private Ltd Contact us      Privacy Policy      Terms of use      Report Abuse      Advertising      [ZULU1097]