mahara-contributors team mailing list archive
-
mahara-contributors team
-
Mailing list archive
-
Message #33015
[Bug 1528351] A change has been merged
Reviewed: https://reviews.mahara.org/6110
Committed: https://git.mahara.org/mahara/mahara/commit/142faacc5fcef09b6a05cf074c21e738d8a74982
Submitter: Robert Lyon (robertl@xxxxxxxxxxxxxxx)
Branch: 1.10_STABLE
commit 142faacc5fcef09b6a05cf074c21e738d8a74982
Author: Robert Lyon <robertl@xxxxxxxxxxxxxxx>
Date: Tue Dec 22 10:43:57 2015 +1300
Bug 1528351: Fixing block order drift in database
Due to a mistake in how blocks were ordered in the system
behatnotneeded - existing tests should be ok
Change-Id: Iac857c85d60e5948b6f95ddccee7a2e8cf43b1b4
Signed-off-by: Robert Lyon <robertl@xxxxxxxxxxxxxxx>
--
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/1528351
Title:
Block order numbers out of sync with number of blocks in a cell
Status in Mahara:
Fix Committed
Status in Mahara 1.10 series:
Fix Committed
Status in Mahara 15.04 series:
Fix Committed
Status in Mahara 15.10 series:
Fix Committed
Bug description:
Due to Bug #1523719 there can exist a mismatch problem between the
count of blocks in a page cell and the maximum order number of said
blocks, eg you can have either a first block not being at order
position 1 or have gaps in order rank, eg 1,2,4 etc, like this:
id | view | row | column | order | maxorder | countorder
----------+---------+-----+----------+--------+---------------+--------
10537 | 2754 | 1 | 4 | 3 | 3 | 1
22486 | 6616 | 1 | 2 | 1 | 4 | 3
22487 | 6616 | 1 | 2 | 2 | 4 | 3
22490 | 6616 | 1 | 2 | 4 | 4 | 3
We need a sql query to find these problems and have an update to fix
the problem areas in the database.
Here is a query to find the problem cells:
SELECT b.id, b.view, b.row, b.column, b.order,maxorder,countorder FROM block_instance b JOIN
(SELECT view AS sview, "row" AS srow, "column" AS scol, COUNT("order") AS countorder, MAX("order") AS maxorder FROM block_instance GROUP BY view, "row", "column") AS myview ON myview.sview = b.VIEW AND myview.srow = b.row AND myview.scol = b.column
WHERE maxorder != countorder
ORDER BY b.view, b.row, b.column, b.order;
To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1528351/+subscriptions
References