I've setup a many-to-many relationship that links Projects / Products / Applications types through a common child type named "sublink".
The scenario is:
I need to build a list of Projects filtering them by Product used in it or by the Application achieved.
I've made a View selecting "sublinks" to be listed.
Then I go to the filters section and setup a new filter picking the "Post relationship" option and then setting the "products" tree.
Everything's fine.
I then tried to add another filter just like this that would have had the "applications" tree selected but when I click the "add filter" button there were no "Post relationship" anymore to be selected.
Is there a way to add a second filter or would you please suggest a workaround for this?
This is Juan, lead Views developer here. Thanks for the feedback.
Mmmm I think you have something here. Most of our query filters default to only one instance per filter. For example, when you filter by a custom field, you can set the filter so it listens to several values, but you can nt have two different filters listening to the same custom field. It happens the same for filters by taxonomies, or by post author, etc. The only query filter that we dsigned from the ground up to suport multiple instances is the filter b post date.
Now, you have a situation that is not so weird: a post type that has two parents. In this scenario, it makes all the sense in the world to be able to filter by a value on each parent post type. Unfortunately, we did not see this in advance and both the way we store our data and our GUI do not support that - yet.
I am taking a note to review and maybe refactor/rewrite this element, so we can support filtering by more than one relationship tree at the same time. It seems like an easy task, but let's see how it goes before claiming that this can be done in short time. I can not make promises or set estimations of timings, but I can tell you that this is something I would like to prioritize and address as soon as posible.
On the meantime, there is no actual feasible alternative. You can "fake" a post relationship filter using some hooks and some metadata used to store the connection, but it is not going to be easy, funny or full functional without full support in Views core.