Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

How to get workitems list of specific type

Hi,

I know how to get a list of all workitems from repository, but is there a way to download workitems by type?

Thanks for any help.

0 votes



4 answers

Permanent link
you will need to create a workitem query object, and execute that to get the list..

see this topic getting-work-items-through-plain-java-api

1 vote


Permanent link
If I understand what you're trying to do, you would need to create a work item query where one of the conditions is Type.  You could then run the query via the web ui and click the "Download as Spreadsheet" icon, or in the Eclipse UI, go to File->Export, expand Team, select Work Items, then select your query.

0 votes


Permanent link
I ask how get list of work items of specific type programmatically.

0 votes


Permanent link
 public void getWorkItemsByType(String type) throws TeamRepositoryException { 

    IAuditableClient auditableClient = (IAuditableClient) getRepository()
        .getClientLibrary(IAuditableClient.class);

    IQueryClient queryClient = (IQueryClient) getRepository().getClientLibrary(
        IQueryClient.class);

    IQueryableAttribute attribute = QueryableAttributes.getFactory(
        IWorkItem.ITEM_TYPE).findAttribute(getProjectArea(),
        IWorkItem.TYPE_PROPERTY, auditableClient, null);

    IWorkItemClient workItemClient = (IWorkItemClient) getRepository()
        .getClientLibrary(IWorkItemClient.class);

    List<IWorkItemType> types = workItemClient.findWorkItemTypes(
        getProjectArea(), null);

    String ppp = types.get(0).getIdentifier();
    Expression expression = new AttributeExpression(attribute,
        AttributeOperation.EQUALS, type);

    IQueryResult<IResolvedResult<IWorkItem>> results = queryClient
        .getResolvedExpressionResults(getProjectArea(), expression,
            IWorkItem.FULL_PROFILE);

  }

It may be useful for someone

0 votes

Your answer

Register or log in to post 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 369

Question asked: Nov 13 '12, 12:53 p.m.

Question was seen: 6,280 times

Last updated: Dec 18 '12, 12:27 p.m.

Confirmation Cancel Confirm