Adding queries to Team Project template
i create queries in template, shows tasks in envisioning iteration, tasks in planning iteration, etc. new projects.
my problem how enable query know team project name created under, , realize iteration path under current project?
my query looks this:
team project = @project
iteration path under skabelon test 2\envisioning
work item type = task
however name skabelon test 2 current project, , name of new project created based on process template. advice on how enable in wiq file query work on new project created template (and name)?
i have tried use iteration path under @project\envisioning, doesnt work.
this simple. problem here is, cannot view select query string team explorer. i explain in detail 1 example. if have installed visual studio sdk november 2006, easier showcase example trying say.
from team explorer, create own query whatever want, use following steps see exact select query behind query have created in user friendly manner ...i.e...throuhg ui.
1. if have installed vs 2005 sdk, november 2006 proceed next steps.
2. open vs 2005 sdk browser, select team foundation server sdk area.
3. in right side, samples listed..select last example i.e. c# example.workitemexplorer -> right side click "open sample in visual studio"... complete solution in vs 2005 ide.
4. run application after building solution, prompt new window asking server name connect -> give server name , click connect.
5. once connected -> listed projects in dropdown, select project have created query. in team queries section have 2 things.
1. team queries
2. queries.
6. select query have created under team project. once selected query displayed in query string section.
for e.g.
=======
i have created following query give me workitems under specified iteration path:
select [system.id], [system.title], [system.createdby], [system.assignedto] workitems [system.teamproject] = @project and [system.iterationpath] under '<iteration path>' order [system.id]
how add query process template:
1. once have created query, save file “<queryname>.wiq” (note: wiq workitem query extension, changing extension can cause error)
2. copy file (.wiq) , put under location (queries folder) in process templates.
· process template name
o work item tracking
§ queries
3. queries folder contain stored queries.
4. once copied query file, need update xml i.e. workitems.xml under work item tracking folder
5. open xml file , update under following tag.
<queries>
<query name="<query name>" filename="workitem tracking\queries\<query name>.wiq" />
</queries>
6. latest query updated in process template, process template can uploaded , while creating new team project process template, newly added queries reflected.
=========================================================================
if not installed vs 2005 sdk, please use following code query string. have create sample application , use following code.
note: sample code not exact application contains complete code can run application directly without compilation errors.
using microsoft.teamfoundation.workitemtracking.client
private system.windows.forms.treeview treequeryview;
private system.windows.forms.textbox editquery;
storedquery query = (storedquery) treequeryview.selectednode.tag;
if (query != null)
{
editquery.text = query.querytext;
}
the above sample code gives query string need pass query stored in team project.
hope helps.
thanks,
kathir
Archived Forums V > Team Foundation Server - Process Templates
Comments
Post a Comment