mahara-contributors team mailing list archive
-
mahara-contributors team
-
Mailing list archive
-
Message #37141
[Bug 1613135] [NEW] Fix negative block_instance sortorders before running upgrade
Public bug reported:
See:
https://mahara.org/interaction/forum/topic.php?id=7687&offset=0&limit=10#post30945
For Bug 1528351 we added an upgrade block that corrects the
block_instance sortorder drift that had been created by Bug 1523719. As
a workaround to the uniqueness constraint on that column, this block
temporarily moves the sortorders into the negative integerspace, and
then re-orders them as positive numbers.
However, we've had multiple reports of sites that have somehow got
negative numbers already in their block_instance.sortorder column. These
sites then error out during the upgrade, because the extant negative
numbers turn into positive numbers, and then there's a uniqueness
violation if another block being re-ordered overlaps with it.
Ghada has written up a block of code that can fix this, and we've shared
it with some affected sites via the forum. It should be easy to add it
to the basic upgrade script, though. In order to reduce complications,
we could preface it with a check to see whether there are negative
sortorders in the database, and only run this additional step if we find
any negatives.
** Affects: mahara
Importance: Medium
Assignee: Aaron Wells (u-aaronw)
Status: In Progress
** Affects: mahara/15.04
Importance: Medium
Assignee: Aaron Wells (u-aaronw)
Status: In Progress
** Affects: mahara/15.10
Importance: Medium
Assignee: Aaron Wells (u-aaronw)
Status: In Progress
** Affects: mahara/16.04
Importance: Medium
Assignee: Aaron Wells (u-aaronw)
Status: In Progress
** Affects: mahara/16.10
Importance: Medium
Assignee: Aaron Wells (u-aaronw)
Status: In Progress
** Also affects: mahara/16.10
Importance: Undecided
Status: New
** Also affects: mahara/15.04
Importance: Undecided
Status: New
** Also affects: mahara/16.04
Importance: Undecided
Status: New
** Also affects: mahara/15.10
Importance: Undecided
Status: New
** Changed in: mahara/15.04
Milestone: None => 15.04.10
** Changed in: mahara/15.10
Milestone: None => 15.10.6
** Changed in: mahara/16.04
Milestone: None => 16.04.4
** Changed in: mahara/16.10
Milestone: None => 16.10.0
** Changed in: mahara/15.04
Assignee: (unassigned) => Aaron Wells (u-aaronw)
** Changed in: mahara/15.10
Assignee: (unassigned) => Aaron Wells (u-aaronw)
** Changed in: mahara/16.04
Assignee: (unassigned) => Aaron Wells (u-aaronw)
** Changed in: mahara/16.10
Assignee: (unassigned) => Aaron Wells (u-aaronw)
** Changed in: mahara/15.04
Importance: Undecided => Medium
** Changed in: mahara/15.10
Importance: Undecided => Medium
** Changed in: mahara/16.04
Importance: Undecided => Medium
** Changed in: mahara/16.10
Importance: Undecided => Medium
** Changed in: mahara/16.10
Status: New => In Progress
** Changed in: mahara/16.04
Status: New => In Progress
** Changed in: mahara/15.10
Status: New => In Progress
** Changed in: mahara/15.04
Status: New => In Progress
--
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it!
https://bugs.launchpad.net/bugs/1613135
Title:
Fix negative block_instance sortorders before running upgrade
Status in Mahara:
In Progress
Status in Mahara 15.04 series:
In Progress
Status in Mahara 15.10 series:
In Progress
Status in Mahara 16.04 series:
In Progress
Status in Mahara 16.10 series:
In Progress
Bug description:
See:
https://mahara.org/interaction/forum/topic.php?id=7687&offset=0&limit=10#post30945
For Bug 1528351 we added an upgrade block that corrects the
block_instance sortorder drift that had been created by Bug 1523719.
As a workaround to the uniqueness constraint on that column, this
block temporarily moves the sortorders into the negative integerspace,
and then re-orders them as positive numbers.
However, we've had multiple reports of sites that have somehow got
negative numbers already in their block_instance.sortorder column.
These sites then error out during the upgrade, because the extant
negative numbers turn into positive numbers, and then there's a
uniqueness violation if another block being re-ordered overlaps with
it.
Ghada has written up a block of code that can fix this, and we've
shared it with some affected sites via the forum. It should be easy to
add it to the basic upgrade script, though. In order to reduce
complications, we could preface it with a check to see whether there
are negative sortorders in the database, and only run this additional
step if we find any negatives.
To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1613135/+subscriptions
Follow ups
-
[Bug 1613135] Re: Fix negative block_instance sortorders before running upgrade
From: Robert Lyon, 2016-10-25
-
[Bug 1613135] Re: Fix negative block_instance sortorders before running upgrade
From: Robert Lyon, 2016-10-25
-
[Bug 1613135] Re: Fix negative block_instance sortorders before running upgrade
From: Robert Lyon, 2016-10-25
-
[Bug 1613135] Re: Fix negative block_instance sortorders before running upgrade
From: Robert Lyon, 2016-10-21
-
[Bug 1613135] Re: Fix negative block_instance sortorders before running upgrade
From: Son Nguyen, 2016-08-23
-
[Bug 1613135] A change has been merged
From: Mahara Bot, 2016-08-22
-
[Bug 1613135] A change has been merged
From: Mahara Bot, 2016-08-22
-
[Bug 1613135] Re: Fix negative block_instance sortorders before running upgrade
From: Robert Lyon, 2016-08-22
-
[Bug 1613135] A change has been merged
From: Mahara Bot, 2016-08-22
-
[Bug 1613135] A change has been merged
From: Mahara Bot, 2016-08-22
-
[Bug 1613135] A patch has been submitted for review
From: Mahara Bot, 2016-08-22
-
[Bug 1613135] A patch has been submitted for review
From: Mahara Bot, 2016-08-22
-
[Bug 1613135] A patch has been submitted for review
From: Mahara Bot, 2016-08-22