It's all about the answers!

Ask a question

Making the WorkItem Query Repository Generic


Sachin Nayak (151) | asked Aug 06 '08, 12:41 a.m.
JAZZ DEVELOPER
Some places in the WorkItem Query Repository Service code, the item types are hard coded.

For example in the constructor of ASTTransformer class the item type is hard coded as

fQueryItemType= IWorkItem.ITEM_TYPE;

Can this be fixed, such that the item type is passed as an argument. This will help use the repository service to save and run the queries on types other than WorkItem.

Regards,
Sachin

2 answers



permanent link
Matt Lavin (2.7k2) | answered Aug 06 '08, 8:20 a.m.
FORUM MODERATOR / JAZZ DEVELOPER
There are two query related services available to components. The
Repository component provides a generic IQueryService that can be used
to query arbitrary objects in the repository. The query service that
you are looking at is the other one, provided by work items, that has
extra support for making queries of Work Items easier.

If you would like to query other types of items, take a look at
IQueryService.

sachinnayak wrote:
Some places in the WorkItem Query Repository Service code, the item
types are hard coded.

For example in the constructor of ASTTransformer class the item type
is hard coded as

fQueryItemType= IWorkItem.ITEM_TYPE;

Can this be fixed, such that the item type is passed as an argument.
This will help use the repository service to save and run the queries
on types other than WorkItem.

Regards,
Sachin

permanent link
Patrick Streule (4.9k21) | answered Aug 08 '08, 4:06 a.m.
JAZZ DEVELOPER
Can this be fixed, such that the item type is passed as an argument.
This will help use the repository service to save and run the queries
on types other than WorkItem.

Support for creating/saving/running queries for item types other than
work items but using the same infrastructure (Query Editor etc.) is
planned but not available yet.

The underlying Expression model and transformer that you are mentioning
could query for item types other than work items already, although this
is not explicitly supported functionality yet (the IWorkItem.ITEM_TYPE
that you are mentioning is the default but can be set using a
SelectClause). At the moment, I would discourage to use this, though.

Regards,
Patrick
Jazz Work Item Team

Your answer


Register or to post your answer.