Ability to display journal entries using multiple tags

Bug #1317343 reported by shanen on 2014-05-08
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Mahara
Wishlist
Robert Lyon

Bug Description

Mahara 1.8

Hi Everyone,
At the moment displaying journals by tag allows a user to choose only one tag.

In a scenario where a student writes lots of journal entries for a course say "Underwater basket weaving", but wants some to be public too, they would create two pages: one for the unit and one for the public.

Lets say they assigned the tags to every post "UBW" and to a few of them they add "public".

They create their course page and add journal entries with UBW. No worries!

They create their public page for UBW stuff and add the tag .... which one? They can't add public because that would pickup any other post from oter journals tagges "public", they can't add journals tagged "UBW" because that would add non public posts.

Wishlist item is that: user can display posts with UBW AND Public

Cheers,
Shane.

Aaron Wells (u-aaronw) on 2014-05-08
Changed in mahara:
importance: Undecided → Wishlist
tags: added: blog tags
Aaron Wells (u-aaronw) wrote :

One issue we run up against, when dealing with this situation, is the question: When you select multiple tags, are you indicating that you want to display journal entries that contain ANY of those tags? Or do you want to display journal entries that contain ALL of those tags?

From your scenario, it sounds like you're interested in showing entries that contain ANY of those tags?

We could of course add an additional configuration option to let the user specify ANY/ALL, but I'd prefer to avoid adding further config options if we can (because it just makes the "7 clicks to do anything" problem worse), so if ANY is the more common use-case, I'd say it's best to just stick with that.

Stéphane (smlavoie) wrote :

From my point of view, with experience as a user in Diigo, selection of multiple tags is done by clicking on them and the resulting page displays artefacts that contains ALL of those tags (a AND operator).

Hi Stephane,
I like that approach, keeps it simple. What do you think Aaron?

I had been working on this problem a while back - so I've submitted what I had envisioned as a possible starting point for this.

It deals with tags to include in the search and tags to ignore from the results. So it's more of a list of ANY (but not these).

So if we had some entries tagged like so:

1) fruit, apple, salad
2) fruit, pear
2) fruit, tomato, vegetable, salad
2) fruit, orange

And choose to include tags 'fruit' and 'salad' but not include 'vegetable' it will return the first item

Hi Robert,
Thanks for picking this up again. I have been with many users who are currently creating meta tags - multiple tags in one tag e.g "PDR (2014)", "PDR (2013)", etc to get around the limitation of being able to drop journals on a page using only one tag.

So, in this case they really want to use multiple tags on the journal such as "PDR, 2013, Research, Income".
And then they might want to create a page with one block showing research income for 2013 PDR.
Another block might show income for all of 2013, regardless of whether or not it is from research.

Compared with your use case above I don't think filtering out entries that have "PDR" because I didn't include it would work for the user.

However, if you added a secondary section to filter out entries by tag, then I can see the user being able to specify an AND list, but if they want to provide some exclusion criteria if they want to.

What do you think of this approach?
Cheers.

might look like:

Choose entries by tag(s)
<selection list/>

Exclude entries if they have the following tag(s)
<selection list/>

Aaron Wells (u-aaronw) wrote :

Ah, I misread Shane's original use-case. From that, and Stephane's comment, it sounds like AND (i.e. "ALL") is the operation that users want, rather than OR (i.e. "ANY").

So, if you select more than one tag, then the block shows you only those entries that contain ALL of the tags that you've selected.

Do you know what the exclusion use-case was, Robert? I do seem to recall that someone asked for it at some point, which is why you implemented it in your patch.

Cheers,
Aaron

Changed in mahara:
status: New → In Progress
assignee: nobody → Robert Lyon (robertl-9)

Hi Kristina, Aaron, Robert,
We have some money that could help complete this wishlist item, it's becoming more urgent for our strategic/operational goals. If you could provide an estimate of the cost and time I will try to secure the funds depending on the details.
Many thanks,
Shane.

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

Hi Kristina,
I agree, point C would be a great first choice.

In Moodle when searching sites they use little + and - signs.

+ indicates must include, - indicates must not include.

+cats +domesticated -siamese

would translate to: results that include cats AND domesticated but NOT siamese

what do you think of these +/- systems?

Attached is a screengrab of an example in Moodle.

A few more scenarios from Shane:

Out of interest I wanted to know how the major social media platforms approach this, and found this interesting roundup: http://www.socialmediaexaminer.com/boolean-search-on-social-media/

At the conference in March Aaron mentioned the idea of a full boolean option similar to these web sites, as opposed to my proposal for a limited AND solution. I think this power would be great if it could be done in a useable/simple way. Twitter etc may have achieved this, and by modelling the top social network sites we are enabling users to easily transfer this knowledge to Mahara.

My own use case for my role in Mahara management at the moment would be using the following tag combos to create boxes on a page:

2014 & PDR & mahara & training (only training activities listed for my 2014 Professional review)
2014 & PDR & mahara & support (only mahara related support e.g in class support, making videos, etc) but not list training again)
2014 & PDR & mahara & conferences (only journal entries with these three)

In other boxes I could list other support, training and conferences using:

2014 & PDR & training NOT mahara
2014 & PDR & support NOT mahara
2014 & PDR & conferences NOT mahara

Changed in mahara:
milestone: none → 1.11.0

The plan for the implementation so far (funding through Uni Canberra):

At minimum there needs to be the ability to indicate which tags to include and which to exclude. We are still looking for the best library to use for that, but tend to go towards one that shows the "in" and "out" tags in one field if it can be done in an accessible way so that not much additional information is needed to decipher which one is which. If that is not possible, there will be two fields.

We would limit the search to "AND" and "AND NOT" to keep the UI from getting too confusing as many people will most likely not want to deal with an advanced search screen.

Reviewed: https://reviews.mahara.org/3336
Committed: http://gitorious.org/mahara/mahara/commit/66136667c241f4bd3988cdb700741b5f85083859
Submitter: Aaron Wells (<email address hidden>)
Branch: master

commit 66136667c241f4bd3988cdb700741b5f85083859
Author: Robert Lyon <email address hidden>
Date: Wed Mar 19 20:45:24 2014 +1300

Render a tagged journal block with multiple tags in play (Bug #1317343)

To include and/or exclude certain tags - has two pools of tags; those
that are 'in' and those that are 'out'.

To exclude a tag begin your search with a minus sign.

Change-Id: I32a3b3d3f244d08bd0547d72db25b8189642fc0e
Signed-off-by: Robert Lyon <email address hidden>

Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/4103
Committed: http://gitorious.org/mahara/mahara/commit/1b663910d8f7a2e0b9a24dd2143db823da9e0aed
Submitter: Aaron Wells (<email address hidden>)
Branch: master

commit 1b663910d8f7a2e0b9a24dd2143db823da9e0aed
Author: Robert Lyon <email address hidden>
Date: Thu Dec 18 15:45:42 2014 +1300

Don't expand the comment lists on page edit screen (Bug #1317343)

This was causing some problems with tagged posts
- also hiding the 'add comment' link on page edit screen.

And making the comments info show when no comments were on item and
allow comments for artefact was enabled. This is an issue with newer
versions of php.

Also placing some of the template files in the new correct location

Change-Id: I599e16b0899559a3ebcdf68cff53220b1d83f2d6
Signed-off-by: Robert Lyon <email address hidden>

Robert Lyon (robertl-9) on 2015-01-28
Changed in mahara:
status: In Progress → Fix Committed

The implemented functionality was sponsored by the University of Canberra in Australia.

tags: added: nominatedfeature

Hi Kristina,
Looks like we are stuck upgrading to 1.10 due to various timing constraints. I would have liked to upgrade from 1.9 to 15.04, but have been told no :)

Given this predicament, is the patch easily back ported to 1.10?

Thanks,
Shane.

Yes, it is, Shane. I hope you have it on your testing instance now.

We'd like to thank the University of Canberra for sponsoring the implementation of this feature. Thanks, Shane.

summary: - wishlist: ability to display journal entries using mulitple tags
+ Ability to display journal entries using mulitple tags
summary: - Ability to display journal entries using mulitple tags
+ Ability to display journal entries using multiple tags
Robert Lyon (robertl-9) on 2015-04-17
Changed in mahara:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers