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

How can I exclude items from a query result which have a parent of specific type and which is filed against the same category?

I have an actually simple problem to solve:

I need to create an RTC query which contains an expression like "has no feature as parent item which category is the same as 'mine'". So I want to exclude those items which have a parent of a specific type (a "Feature" in our process template) which is filed against the same category.

How can I accomplish that?

BR
Dan

0 votes



One answer

Permanent link

I think you can achive these conditions using the below: 


Use [Parent] > [Type] with "is not" XXX.

Use [Filed Against] and "is" and Check the "Related to Current User" check box.

SampleConditions


0 votes

Comments

Hi Ian!

Thank you, but I guess this will not solve my problem. Maybe I need to be more precise. This is some pseudo code for my query:
An item A is in the result set, if and only if....
    
    (
        A.state == "foo"
    )
    AND
    NOT (
        ∃ item B:
        B == A.parent
        AND
        B.type == "Feature"
        AND
        B.category = A.categroy
    )
So, the critical think is the very last criterion: Comparing a related items attribute value with the value of the item the query is applied to.

The use case is simple: we have a control board which discusses new feature proposals (in a certain state). The query we are looking for is the query which gives the items to be discussed in the control board. Now we have the rule, that child-items, which are filed against the same category as their parent do not need to be discussed there. (But this does not hold for children which are filed against other (sub-)categories necessarily).

So, this is why "parent has same category" is important.

Best Regards,
Dan

I think it is not possible to obtain "child items which are filed against the same category as their parent". You can only choose a specific category or the Related to Current User option. And I don't think there is a grouped AND NOT option. For this kind of thing, I think you might need to create a JRS report, where you can specify more complex logic. In Report Builder, if necessary you can also go to the Advanced section under Format Results tab and adjust the underlying SQL to match your requirement.

There are lots of RFEs to improve the logic options in queries so that they are more robust. FYI.

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
× 12,019
× 201

Question asked: Nov 20 '18, 11:24 a.m.

Question was seen: 2,743 times

Last updated: Nov 26 '18, 8:24 p.m.

Confirmation Cancel Confirm