English 中文(简体)
How do I write a TFS 2010 Work Item query clause whos value is a field value?
原标题:
  • 时间:2011-05-03 13:56:21
  •  标签:
  • wiql

I think this question may be spawned from lack of knowledge, but here we go...

I am trying to write a new team query (using the new query option of team explorer, in VS 2010) what I want is fairly simple; essentially a list of work items whos [Completed Work] value exceeds the [Original Estimate] field value. In other words WIs that have exceeded their original estimates.

The VS 2010 view does not seem to have an option to show the WIQL being generated under the hood, so I ll have to describe what I have done/am trying to do via the VS 2010 UI.

Clauses are fairly standard to start;
Team Project = @Project
And Work Item type = Task
And State = [Any]

I have added a caluse (to remove any work items without an estimate)
And Orignial Estimate <>

I thought the next step would be simplicity itself; adding a clause along the lines of
And Completed Work > Original Estimate

But no matter how I try to write "Original Estimate" in the value filed of the UI (as Original Estimate, [Original Estimate] and many other variations) to date all I get is a line indicating a that Input string was not in a correct format.

Is this possible? I would have thought simple comparisons to the value of another WI field would be supported, are they? If it is possible what the he** is the syntax?

Thanks.

Update

I had a look at the Task template and confirmed that both Original Estimate and Remaining Work are doubles and have the following full names (should that be relivant)

     Friendly Name       Type      Ref Name     
     Original Estimate   Double    Microsoft.VSTS.Scheduling.OriginalEstimate
     Remaining Work      Double    Microsoft.VSTS.Scheduling.RemainingWork
最佳回答

You simply need the >= [Field] operator instead of the >= operator:

Original Estimate >= [Field] Completed Work

问题回答

暂无回答




相关问题
WIQL and other languages

Is WIQL specific to the TFS SDK or can it be used in other languages? For example if I have built a client using TFS SDK that gets info about projects on the tfs, is it possible to somehow reuse the ...

Where to get started with querying TFS database/warehouse?

Right now all I have is a link to the tfs portal http://... I d like to either write an app that queries directly or write a SQL query that queries the database (which I do not know the server ...

Find WorkItems that were assigned to X in the last 30 days

I m trying to find all WorkItems that were assigned to a person X in the last 30 days. The big problem I have is the "in the last 30 days"-part. I thought about using the "ever" or "asof" keywords, ...

热门标签