Show collections in "Shared with me" screen

Bug #1476495 reported by Aaron Wells
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
Wishlist
Aaron Wells
15.10
Fix Released
Undecided
Unassigned

Bug Description

Similar to Bug 1476491 & Bug 1476492, the idea here is that we'd show collections on the "Shared with me" screen. (Currently it only shows pages, and each collection for each page is listed individually).

This one is a little bit trickier than the other two bugs, because of the search bar. Presumably you'd still want to be searching the individual pages as well as whole collections, in which case it might make sense to show individual pages as well as the collections they belong to...

Aaron Wells (u-aaronw)
Changed in mahara:
status: New → In Progress
importance: Undecided → Wishlist
assignee: nobody → Aaron Wells (u-aaronw)
milestone: none → 15.10.0
tags: added: nominatedfeature sharedwithme
Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "master" branch: https://reviews.mahara.org/5000

Revision history for this message
Mahara Bot (dev-mahara) wrote :

Patch for "master" branch: https://reviews.mahara.org/5001

Revision history for this message
Aaron Wells (u-aaronw) wrote :

1. Create collections C1, and C2.
2. Create pages P1A, P1B, P2A, P2B, P2C, P4, P5
3. Put pages P1A & P1B into Collection C1
4. Put pages P2A, P2B, P2C into Collection C1
5. Write a comment "I am on P1A" on P1A.
6. Write a comment "I am on P1B" on P1B.
7. Write a comment "I am on P4" on P4.
8. Share all these pages with another user.
9. Log in as the other user, and go to the "Portfolio -> Shared with me" page.5. View the "Latest pages" block on your dashboard

Expected result: You should see "C1 (2 pages)", "C2 (3 pages)", P4, and P5 on your list of pages shared with you. For the most recent comment, you should see "I am on P1B" for C1, "I am on P4" for P4, and no comment for C2 and P5.

Revision history for this message
Aaron Wells (u-aaronw) wrote :

Um, ignore that "5. View the "Latest pages" block on your dashboard" in the previous comment. I had copy-pasted the basic test plan from another bug and forgot to delete that part. :)

Revision history for this message
Jinelle Foley-Barnes (jinelleb) wrote :
Revision history for this message
Jinelle Foley-Barnes (jinelleb) wrote :

I paused the Behat test so we could figure out where it was breaking. This what the screen was showing.

Revision history for this message
Aaron Wells (u-aaronw) wrote :

Hi Jinelle, that error was due to a typo in the parent bug that expanded view_search(). I've fixed that now.

Revision history for this message
Jinelle Foley-Barnes (jinelleb) wrote :

Nice!!! Good find!

I'll re test it now :)

Cheers,
Jinelle

Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/5000
Committed: https://git.nzoss.org.nz/mahara/mahara/commit/462b1c471c851c1093797f99fbc2bc798c396c3a
Submitter: Aaron Wells (<email address hidden>)
Branch: master

commit 462b1c471c851c1093797f99fbc2bc798c396c3a
Author: Aaron Wells <email address hidden>
Date: Mon Jul 20 19:39:17 2015 +1200

Refactoring SQL query in View::shared_to_user() (Bug 1476495)

The old one unnecessarily used two separate queries for Postgres
& MySQL. And it had a bug in how it used MySQL's extended
"GROUP BY" functionality. While MySQL does let you return
non-aggregated columns, it uses an arbitrary record for these of
them, NOT the first record according to ORDER BY.

Also restructured the query a bit for optimization purposes.

behatnotneeded (Test in subsequent patch)

Change-Id: I3d49292025dcf7ac510a84d7e800476defec0525

Revision history for this message
Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/5001
Committed: https://git.nzoss.org.nz/mahara/mahara/commit/0958d6c0c762415632854dd3499479667de213f0
Submitter: Aaron Wells (<email address hidden>)
Branch: master

commit 0958d6c0c762415632854dd3499479667de213f0
Author: Aaron Wells <email address hidden>
Date: Tue Jul 21 16:22:04 2015 +1200

Support for collections in "Shared with me" screen (Bug 1476495)

Change-Id: Ieff8ebae03f6cfb68ea2dd3295f8882910467afb

Revision history for this message
Kristina Hoeppner (kris-hoeppner) wrote :

This feature is sponsored by Pratt Institute in Brooklyn, NY. Thank you very much.

Aaron Wells (u-aaronw)
Changed in mahara:
status: In Progress → Fix Committed
Robert Lyon (robertl-9)
Changed in mahara:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.