Need to update group 'shared with me' block config values on upgrade 15.04+

Bug #1491639 reported by Robert Lyon
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
High
Robert Lyon
15.04
Won't Fix
Undecided
Robert Lyon
15.10
Fix Released
Undecided
Unassigned

Bug Description

In pre 15.04 versions Group homepages have a 'Group pages' block showing the pages that are shared with the group (a yes/no option). This includes pages by members and non-members alike.

After upgrade to 15.04+ there was a new option added so that we have:
* None
* By members of this group
* By anybody

But the problem is we added the new option, By members of this group, to the '1' value (the same as 'yes' before) rather than to the 'by anybody' option (which is '2').

This means on upgrade any pages shared by non-members stop showing up on the shared list for this block.

We need to run an upgrade for the group homepages to make any 'Display shared pages' that were set to 'yes' before hand to be set to 'by anybody' so that the same display rules are preserved.

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/5204

Revision history for this message
Robert Lyon (robertl-9) wrote :

To test when upgrading from version 1.9 or below:

Set up a 1.9 site with two users, A and B

1) Log in as User A and create a group, Group A

2) Log in as User B and create three pages, Page 1, Page 2, and Single page - Place page 1 and 2 into a collection, Collection 1

3) Have User B share the Collection 1 and Single page with Group A - do this via the 'Share with other users and groups' search option.

4) Log back in as User A and view the group home page - you should see all three pages listed under the 'Pages shared with this group by others' section.

5) Upgrade the site master and check the Group A home page - the pages will not be listed

6) Check out the patch 5204 and run the upgrade on the admin/index.php page and then re-check the Group A home page

The pages should be listed again where Collection 1 is listed under the 'Collections shared with this group' sub header and the Single page under the 'Pages shared with this group' sub header.

To test when upgrading from version 1.10:

Set up a 1.10 site and follow the first 4 steps from the above instructions. Then edit the group homepage so that either one of the pages or collections are set to 'off'.

Then do step 5 and 6 from above.

You should only see listed on the group homepage the option that you did not set to 'off'

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

Reviewed: https://reviews.mahara.org/5204
Committed: https://git.nzoss.org.nz/mahara/mahara/commit/192478742a1a0a851cc06e7c32990112a15fe532
Submitter: Robert Lyon (<email address hidden>)
Branch: master

commit 192478742a1a0a851cc06e7c32990112a15fe532
Author: Robert Lyon <email address hidden>
Date: Thu Sep 3 11:08:22 2015 +1200

Bug 1491639: 'Group pages' block on upgrade problem

We need to default the 'display shared pages' option to 'By anybody'
value=2 as this is the same rules as the before upgrade.

We can leave newly created groups to default page/collection display to
'By members of this group'.

behatnotneeded

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

Robert Lyon (robertl-9)
Changed in mahara:
status: In Progress → Fix Committed
Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "15.04_STABLE" branch: https://reviews.mahara.org/5255

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

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

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.