Making the WorkItem Query Repository Generic
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
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
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:
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
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