Can I add Programatically created query in RTC Work Item Query ?
One answer
Comments
I refer a Link https://jazz.net/wiki/bin/view/Main/QueryDevGuide. In that example 2 :Find Potential Duplicates from the Command Line. which is standalone application. I suppose I want add that same query example in RTC client rather than execute on command Line. Is this Possible to add that Program query in RTC client. same Like the Predefined query in RTC ?
That is not even a query, that is an Expression. From that expression, you could probably create a query and save it like this:
IQueryCommon queryCommon = (IQueryCommon) teamRepository
.getClientLibrary(IQueryCommon.class);
IQueryDescriptor descriptor = queryCommon.createQuery(projectArea,
"MyQuery Type " + workitemTypeID, "MyQuery Description",
myExpression);
queryCommon.save(descriptor, monitor);
// OR
IQueryClient queryClient = workItemClient.getQueryClient();
queryClient.save(descriptor, monitor);