Leap2a import of "Just some of my collections" doesn't put the pages into the imported collection

Bug #1464477 reported by Aaron Wells
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
High
Unassigned
1.10
Fix Released
High
Unassigned
1.9
Fix Released
High
Unassigned
15.04
Fix Released
High
Unassigned
15.10
Fix Released
High
Unassigned

Bug Description

If you create a Leap2a export using the option "Just some of my collections", and then import it back into Mahara, the pages and collections get created, but the pages are not linked into the collection. Instead the pages are orphan pages and the collection is empty.

I tested this from 1.8 to 15.10dev and found it present in all versions.

To replicate:

1. Create three pages called "A", "B", and "C"
2. Create a collection called "D"
3. Put the three pages in the collection
4. Go to Portfolio -> Export. Select "Leap2A" format, and select "Just some of my pages". Click "Generate Export". Download the resulting Leap2A file
5. Either as the same user, or as a different user, go to Portfolio->Import
6. Use the "Upload Leap2A file" button to pick the leap2a you just downloaded in step #4. Click "Import"
7. Go to "Portfolio -> Collections" and "Portfolio -> Pages" and see what pages and collections you now have in your portfolio.

Expected result: You should have a collection called "D" with pages "A", "B", and "C" in it.
Actual result: You have an empty collection called "D", and three orphan pages called "A", "B", and "C"

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

Confirmed in versions from 1.8 to 15.10dev. Since the Leap2a code is rather complex, it may not be feasible to backport the fix to 1.9 and 1.10. We'll have to make a judgement call on that once we have a fix in place.

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

In 15.04 this problem is actually worse.

In the earlier versions, the problem only occurs when you the "Just some..." option. But in 15.04 it also occurs when you use the "My entire portfolio" option.

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

The problem in 15.04 is due to a separate regression, and has a separate fix, so I've spun it off into another bug: https://bugs.launchpad.net/mahara/+bug/1474628

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

It turns out this problem only happens if your export selection contains NO ARTEFACTS.

So that's why it happens with a simple test case, where you create empty pages, put them in a collection, and export it. But it does not happen if you do a full-portfolio export, because that will always contain your personal information artefacts (i.e. firstname, lastname, etc).

On the other hand if you create an empty page, put it in a collection, and export that, you'll experience this bug. If you put a single image into that page, and repeat the export, you won't experience this bug.

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

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

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

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

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

commit e7779d203fc597c98d39ce055a6e67b9a490ac83
Author: Aaron Wells <email address hidden>
Date: Wed Jul 15 15:29:01 2015 +1200

Don't skip on setting up pages in leap2a, just because there no artefacts

Bug 1464477

Change-Id: I016d35f35406f4b1c7bcb298ae2966f1d37fed05

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

Patch 4960 is for Bug 1474628.

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

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

Patch for "1.10_STABLE" branch: https://reviews.mahara.org/4969

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

Patch for "1.9_STABLE" branch: https://reviews.mahara.org/4970

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

Reviewed: https://reviews.mahara.org/4970
Committed: https://git.nzoss.org.nz/mahara/mahara/commit/ca583b9f50e620f34af63dd2862962e4c03b4084
Submitter: Aaron Wells (<email address hidden>)
Branch: 1.9_STABLE

commit ca583b9f50e620f34af63dd2862962e4c03b4084
Author: Aaron Wells <email address hidden>
Date: Wed Jul 15 15:29:01 2015 +1200

Don't skip on setting up pages in leap2a, just because there no artefacts

Bug 1464477

Change-Id: I016d35f35406f4b1c7bcb298ae2966f1d37fed05
(cherry picked from commit e7779d203fc597c98d39ce055a6e67b9a490ac83)

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

Reviewed: https://reviews.mahara.org/4969
Committed: https://git.nzoss.org.nz/mahara/mahara/commit/e0a9c65a30c927c05b24fa8cf598b49016ab0ac6
Submitter: Aaron Wells (<email address hidden>)
Branch: 1.10_STABLE

commit e0a9c65a30c927c05b24fa8cf598b49016ab0ac6
Author: Aaron Wells <email address hidden>
Date: Wed Jul 15 15:29:01 2015 +1200

Don't skip on setting up pages in leap2a, just because there no artefacts

Bug 1464477

Change-Id: I016d35f35406f4b1c7bcb298ae2966f1d37fed05
(cherry picked from commit e7779d203fc597c98d39ce055a6e67b9a490ac83)

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

Reviewed: https://reviews.mahara.org/4968
Committed: https://git.nzoss.org.nz/mahara/mahara/commit/6983aeaf4350c95227c6b80b20fd8fcf86ae018c
Submitter: Robert Lyon (<email address hidden>)
Branch: 15.04_STABLE

commit 6983aeaf4350c95227c6b80b20fd8fcf86ae018c
Author: Aaron Wells <email address hidden>
Date: Wed Jul 15 15:29:01 2015 +1200

Don't skip on setting up pages in leap2a, just because there no artefacts

Bug 1464477

Change-Id: I016d35f35406f4b1c7bcb298ae2966f1d37fed05
(cherry picked from commit e7779d203fc597c98d39ce055a6e67b9a490ac83)

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

Thanks to Kwantlen Polytechnic University for sponsoring this bug fix!

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.