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

Can I add Programatically created query in RTC Work Item Query ?

 Hi All,
    I write code for create query using client API and I want to add that Programatically created query in RTC's  Work Items Option. can I add Programatically created query in RTC Work Item Query?

0 votes



One answer

Permanent link
Have you looked at com.ibm.team.workitem.common.IQueryCommon.save(IQueryDescriptor, IProgressMonitor) ?

0 votes

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);

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
× 10,936

Question asked: Jan 13 '16, 4:39 a.m.

Question was seen: 2,577 times

Last updated: Jan 13 '16, 6:46 a.m.

Confirmation Cancel Confirm