Comment 10 for bug 1317343

Revision history for this message
Kristina Hoeppner (kris-hoeppner) wrote : Re: wishlist: ability to display journal entries using mulitple tags

Hello Shane,

Thank you very much for this offer. That would be great. Let's take the financials' discussion off Launchpad. Robert started looking into the estimate and has a few more questions around the implementation of which at least one had already come up earlier.

---
Robert:
Point 1: Allow for the choosing of multiple tags so that posts with ALL those tags get displayed in a taggedposts block eg Tags to include 'cats, domesticated' will return all posts with tags 'cats' and 'domesticated'.

Point 2: Allow for selecting of tags to ignore so that even if (1) is met we can still ignore posts if they contains a tag to ignore, eg Tags to exclude 'Siamese' will mean all domesticated cat posts except the ones about 'Siamese'.

The beginnings of a patch for this is here https://reviews.mahara.org/#/c/3336/ In its current form it does not quite do what we want. For (1) it does an ANY join rather than an ALL - so for 'cats, domesticated' it will return all cats (including non domesticated ones) as well as all non-cat domesticated animals. This also applies to the excluding tags option (2) it will exclude if ANY tags match.

So the first thing to nail down is "what do we want"?.

Do we want:
[A] Point (1) where the join is an AND, and not worry about point (2), or
[B] Point (1) where the join is an OR, and not worry about point (2), or
[C] Point (1) where the join is an AND, and point (2) uses an AND join, or
[D] Point (1) where the join is an AND, and point (2) uses an OR join, or
[E] Point (1) where the join is an OR, and point (2) uses an OR join.
[F] Point (1) where the join is an OR, and point (2) uses an AND join.

---
i would say that option C might be the winner because it requires all tags to be used that you select as per comments 2 and 3 but allows to exclude posts that have a tag / tags that you put into the exclusion list.

What do you think?

Cheers
Kristina