Plain Java API to display all the work Item type??
Hi,
I am trying to display the Id of all the work Item I mean everything (resolved ,archived ...) Some how i am not getting the complete list I am missing the defect which I created and and in a status new The code which I am using is IProgressMonitor progressMonitor = new NullProgressMonitor(); IAuditableClient auditableClient = (IAuditableClient)teamRepository.getClientLibrary(IAuditableClient.class); IQueryClient queryClient = (IQueryClient) teamRepository.getClientLibrary(IQueryClient.class); IQueryableAttribute attribute=QueryableAttributes.getFactory(IWorkItem.ITEM_TYPE).findAttribute(projectArea,IWorkItem.PROJECT_AREA_PROPERTY, auditableClient, null); Expression expression = new AttributeExpression(attribute, AttributeOperation.EQUALS, projectArea); IQueryResult<IResolvedResult<IWorkItem>> results = queryClient.getResolvedExpressionResults(projectArea, expression, IWorkItem.FULL_PROFILE); while(results.hasNext(progressMonitor)){ IWorkItem workItem= results.next(progressMonitor).getItem(); int workItemID=workItem.getId(); System.out.println(workItemID+" "+workItem.getWorkItemType()); } Any kind of help is appreciated Thanks |
Accepted answer
IProgressMonitor progressMonitor = new NullProgressMonitor();
ItemProfile<IWorkItem> arg1 = IWorkItem.FULL_PROFILE; IWorkItem foundId = workItemClient.findWorkItemById(ticketId, arg1, progressMonitor); This solves the issue. Problem with my precious code was in RTC by default the Maximum Query Result Set Size was set to 1000 so I was not getting all the work Item I was only getting 1000 work Items Ralph Schoon selected this answer as the correct answer
|
3 other answers
Ralph Schoon (63.6k●3●36●47)
| answered May 01 '13, 3:47 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
For how to avoid the limit see https://rsjazz.wordpress.com/2012/11/19/using-expressions-for-automation/
https://rsjazz.wordpress.com/2012/10/29/using-work-item-queris-for-automation/ and for load profiles see
|
|
kishan, Can you please tell where to add those two lines and what is the ticketId variable?? |
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.