Opened 12 years ago

Closed 12 years ago

#1736 closed defect (fixed)

Bug when filtering child/parent items

Reported by: Nicklas Nordborg Owned by: Nicklas Nordborg
Priority: major Milestone: BASE 3.2.1
Component: core Version:
Keywords: Cc:

Description

The possibility to filter on parent/child items in table listing was added in #1129.

While the equality operator works fine, the inequality operator can give "confusing" results when an item has more than one child, since it matches on each child item individually and not on all children as a whole.

Consider the following setup with parent/child items:

Parent Child
A A.1, A.2, A.3
B B.1, B.2
C C.1
D D.2
E E.3

Now test the following filters:

Filter Result
=%.1 A, B, C
<>%.1 A, B, D, E

The first result is expected, but not the second, which matches A and B because they have other child items.

The current implementation for '<>' can't be easily defined by any existing "set operations" (eg. contains/not contains). The most intuitive approach would be if '=' can be sort of equivalent to 'contains' and '<>' to be equivalent to 'not contains'. Eg. the second filter above should return only D and E.

The simple case described above should be fairly stright-forward, but we also need to think about list-filters:

Filter Result
=%.1|%.2 A, B, C, D
<>%.1|%.2 A, E

Again, the first is ok, but the second should only return E.

Change History (2)

comment:1 by Nicklas Nordborg, 12 years ago

Owner: changed from everyone to Nicklas Nordborg
Status: newassigned

comment:2 by Nicklas Nordborg, 12 years ago

Resolution: fixed
Status: assignedclosed

(In [6205]) Fixes #1736: Bug when filtering child/parent items

Note: See TracTickets for help on using tickets.