Get children/links of work item combine Queries with Java Plain API
I have an work item and I have to fetch all work items link to this work item ( Ex: have Parent and Contribute to), but I also need to filter links/children with queries (Ex:I use share query to fetch work items type is defect and file against ABC)
|
Accepted answer
Thanh,
please take a look at https://jazz.net/wiki/bin/view/Main/QueryDevGuide especially the section about constructing a term to combine filter expressions. If this helps please mark the answer resolved.
Term term= new Term(Operator.AND); term.add(expressionOne); term.add(expressionTwo); ...IQueryResult<IResolvedResult<IWorkItem>> result= queryService.getResolvedExpressionResults(projectArea, term, profile); thanh nham selected this answer as the correct answer
Comments
thanh nham
commented May 20 '18, 11:24 p.m.
Thank Ulf for your answer, but it still not solve my problem
So you run a shared query and want to get the intersection of those results with the list of children work items of a particular story?
thanh nham
commented May 22 '18, 11:09 a.m.
Thank Ulf.
I think there is only solution is using java code to intersect 2 list like you said.
Actually, I had though about that. But I have to get children (n1) combine query-1 of a list parent (p), then find children (n2) combine query-2 of n1. And I fear that java code will slow the performance, so I ask for a combine query (if it is possible).
|
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.