It's all about the answers!

Ask a question

Programmatically Extended Queries in Work Items Result View


Moti Wertheimer (18913628) | asked Dec 07 '09, 9:11 a.m.
JAZZ DEVELOPER
Hi,

There are some query conditions not supported in the Client.
(For instance, "get all workitems that have not workitem child of type x". if there is a way to do it please tell me)

Programmatically I can perform query and iterate all results in order to filter them.

My question: Is there any way to get the programmatically created results in the "Work items" Qury results view ?

2 answers



permanent link
Patrick Streule (4.9k21) | answered Dec 09 '09, 9:53 a.m.
JAZZ DEVELOPER
There are some query conditions not supported in the Client.
(For instance, "get all workitems that have not workitem child of
type x". if there is a way to do it please tell me)

Programmatically I can perform query and iterate all results in order
to filter them.

My question: Is there any way to get the programmatically created
results in the "Work items" Qury results view ?

You could use
WorkItemUI.showWorkItems(IWorkbenchWindow window, IProjectAreaHandle
projectArea, String title, IWorkItemHandle[] workItems)

--
Regards,
Patrick
Jazz Work Item Team

permanent link
Moti Wertheimer (18913628) | answered Dec 15 '09, 7:30 a.m.
JAZZ DEVELOPER

You could use
WorkItemUI.showWorkItems(IWorkbenchWindow window, IProjectAreaHandle
projectArea, String title, IWorkItemHandle[] workItems)

--
Regards,
Patrick
Jazz Work Item Team


Thanks Patrick,

I had a problem getting the active workbench window while a plugin is running.
Since the plugin runs a FoundationJob it creates dialog. So PlatformUI.getWorkbench().getActiveWorkbenchWindow() returns null.
The solution was to call it after the Job is finished.

job.setUser(true);
job.schedule();
WorkItemUI.showWorkItems(PlatformUI.getWorkbench().getActiveWorkbenchWindow(), projectArea, "Filtered Query", workitems);

Thanks,
Moti

Your answer


Register or 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.