is it possible to create new queries in TFS 2010 based on the result of another query?
For example, one (parent) query selects all work items located under a certain work item (lets say work item with ID=5). And now I want to create other queries, that select all bugs, all tasks etc. from the results of the first query?
There, I only have to change the ID of the "parent" work item once and not in all subsequent queries.
Is this possible in TFS 2010 in combination with VST 2010?
Thanks
Konrad
There is a basic support for what you 're after in the GUI editor for WIQL: try with query of type "Tree of Work Items" - which creates a multi-level structure. There is minimal support to what you can handle in this context, for example it's not possible to pick work items with different criterias from level to level.
On the other hand you can implement a custom tool using the TFS-API. There you should be able to tailor to your needs exhaustively. I can support in such endeavor in case you 're interested.
What you want to do seems to be more of a report than a plain query. I think you should have a look at implementing custom reports.
Related
I am new to TFS and know the basic concepts. In my case we have customized TFS a lot which contains around 17 collections, custom fields in work items etc.
I have some queries for which I require some answers. The questions might be generic, but any help or suggestions on the below queries would be great.
Following are my queries:
1.) Show Work Item ID in a specific format. Can it be done
2.) Auto Fill custom fields for a work item based on a category / linked bugs (analogous to Relative Path column type)
3.) While raising a WI through Visual Studio development tool, the datepicker only takes date value and not time. The same work items when raised through web portal the datepicker gives time value as well.
4.) Auto Fill the efforts spent in Child Work items (summation of all child link items in the parent)
5.) Reminders to be sent if iteration / scrum set date crossed. Also check for Work Items as well, if set date is crossed.
6.) Create Queries which can query across all collections / verticals. Currently queries can be made only against each entire collection, but not across all collections. Do we have any mechanism to query against multiple collections?
7.) Email alerts customizations in TFS.
8.) Can the collections be merged into 1 default collection.
I have tried to find few answers from my end as well, and would like to know, if it is correct.
1.) Work Item ID cannot be shown in a specific format as it is system generated
2.) For Auto Filling of Work Item fields, it cannot be done. Manual approach is the only way (unless there is a way to pre-populate fields
3.) One can only query for all projects in a single collection. But it is not possible to query against multiple collections and get the results.
So require assistance on the above queries and also validate the answers I have got for few of my questions.
Any help or suggestions or relevant links would be great.
Thanks In Advance!!!..
Please kindly check below inputs
You are right. This is by designed. You can not change to use other
format of work item.
Yes. This could not be done at present. It's still a user voice, but
on the Roadmap. Support for calculated fields and roll-ups.
Sorry, not get your point.You could use the DateTimeControl type to give users a calendar picker to select a date for a DateTime field. By using this control, you can quickly select a date and time for the field. For details.
You could do this from a sprint backlog or task board. Details
please take a look at our official tutorial here: Rollup of work
and other fields
We do not have this kind of build-in time reminder for work items.
However, as a workaround, There is a dashboard widget that uses #me
in its query.
You can also cobble something together using the REST API and a
scheduled build. Calling a work item query and sending email is
pretty easy from PowerShell.
No, they are using different database. You are only able to query
across team projects int the same project collection.
It's able to do this but with a little bit complicated. For detail
info, please take a look at this link: Customize TFS 2015 alert
email
There is no default way to do this. I do not think there is a
possibility of merging two TFS collections other than creating a new
collection, creating the team projects and use a tool such as TFS
integration tools to move the team projects from the source
collections.
As you can see, history will be rewritten with new dates, changeset
and work items ids etc, if you are trying to merge collections.
I want to select user stories with more than 5 bugs as children.
Using below query I can get user stories with at least one bug but filtering out the ones with less than 5 I'm lost.
How can I do this? Or is there any other way I can get this output? i.e: TFS extension
There is no build-in feature to count/filter linked work item's count of a specific work item type.
As a workaround, you could export tfs query results to Excel and manage the results in excel side. With the help of excel, you should be able to filter out those work items you needs.
Another way is using TFS API to get the work items and their linked work items with bug type, finally count the number of linked work items. About how to use API, please take a look at this related question: Retrieving work items and their linked work items in a single query using the TFS APIs
You can use in the query in "Related Link Count" field:
We have a work item structure in TFS 2015 (Will soon be upgraded to 2017, in case there are features there which may be relevant) which consists of the usual CMMI template hierarchy: Epic->Feature->Requirement (Where requirement is roughly analogous to PBI in other templates, for those unfamiliar)
We have abstracted the large body of work by making Epic and Feature meaningful. Applying a common analogy, an Epic->Feature->Requirement in this setup for a requirement on a webpage might be [Security]->[Password Management]->[Password Complexity rule xyz]
The main problem is that, while the 'tree of work items' type query is powerful and useful for this setup, some features of TFS only work on flat list of work item type queries, including dashboard widgets. Continuing the example above, if I wanted to create a widget to see how many Security Requirements (PBIs) were completed, I could not do that.
I'm looking for ideas on how to get around this restriction in VS2015 or VS2017, and the best solution I can think of so far is to create a service hook which uses the TFS api to traverse the tree and then copy the title or ID of the parent Epic/Feature onto the Requirement in some dummy field. This seems very clunky and inelegant. Another option would be to mirror the Epic/Feature hierarchy in Areas, but this is quite unfavorable as we use the Area for another purpose and it creates a maintenance problem as they would need to be kept in sync.
There is Query Results and Chart for Work Items widgets that can uses Tree of work items in TFS 2015, but can’t just count the children work items (e.g. Requirements)
You can build a custom widget extension and retrieve the corresponding work items through REST API and count related work items.
There is a sample with detail code of how to retrieve the data through REST API, so you can refer to this article to build a custom widget extension: Add a dashboard widget
I have 3 entities (WorkItem Type) in TFS, This is the relationship between my entities:
[Release] 1------n [WorkOrder] n--------n [Bug]
I need to show Release and it's related WorkItems and related Bugs in one query (list).
I tried edit query and set it as WorkItems and Direct Links but it will show only one level of related Items.
I tried edit query and set it as Tree of workitems it works only for parent-child relations.
Any Idea?
Can you verify that the statement below is correct?
All WorkOrder items are children to a parent Release. Bugs are not directly linked to a Release, but are related to any number of WorkOrders.
Unfortunately it appears that you are correct. For the time being there isn't a way to directly create the exact query you want that will show multiple Releases, all of the children WorkOrders, and all of the related Bugs in a single multi-level tree view.
I can think of two workarounds for you:
Remove the Release from the results and instead add a query parameter that targets specific releases. Use the Work Items and Direct Links query option to query WorkOrders as the top-level work item and Related Bugs as the linked work items. This will provide the data you want in the expected format (Bugs would collapse under Work Items). If it's not for a report, your developers likely won't complain about having to key in a specific release. Why would they want to query work items across multiple releases as part of their work? If it is for a report, you could pull in multiple query results to Excel or another tool and format accordingly.
SQL Server Reporting Services should allow you to build filters for this, should you wish to build a report.
I think this answer your question:
I am exploring feasibility of using TFS for software process on our next project. One need is to be able to create a requirements document from individual linked requirements within TFS. I've currently got mock-up projects in both Agile and CMMI with a set of requirements linked with parent child relationships. I can query these requirements in both Agile and CMMI but the result doesn't show the hierarchy. With CMMI I can run the report "Project Management::Requirements Progress" which shows requirement titles with indention based on hierarchy. It doesn't however show the detailed descriptions
What I'd like is to auto generate a Word document with hierarchical headings based on TFS requirement work items and their parent/child relationships.
Also to generate rich text and drawings from the TFS requirement Work Item descriptions. So a secondary question is how to change the description field in the Requirements Work Item to support rich text so that the reports can use it. If I try to edit the Task Work Item Description field it warns me that continuing to save may make file unloadable.
To support RichText in your work items you need to edit your work item definition by Work Item Editor wihch can be found in the TFS Power Tools thingy. You should add a new custom rich text field and use that field for your descriptions. (The downside is, Excel plug-in does not support editing richtext fields.They are read-only in Excel)
For printing work items, I had to improvise solution and worked pretty well for me. I used the "Mail Merge" functionality of MS Word and designed a word document. After that I prepared a SQL query that takes the needed field values from TFS Warehouse. Rest is done by MS Word. Mail Merge prepares a single document for each work item record. They are separate documents but it does the trick I suppose.
For creating a hierarchy I think you need to go a little deeper. Since TFS supports parent/child relationships but does not follow any particular sort order, I suppose another custom field is needed. You can either use the field to give hierarchy tokens manually (1.1, 1.2, etc.) or you can develop a little custom command line utility to traverse the work item tree and autoset values for the mentioned custom field.