Artefacts not locked in in submitted view
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mahara |
Fix Released
|
High
|
Robert Lyon |
Bug Description
This looks to be problem with data on older sites. I've marked as high as bad data should be sorted asap
Looking in the database there are views submitted for review but artefacts used in the view are not locked.
To find the rows:
SELECT a.id
FROM view_artefact va
LEFT JOIN view v on v.id = va.view
LEFT JOIN artefact a on a.id = va.artefact
WHERE v.submittedgroup IS NOT NULL AND a.locked = 0
And to fix them:
UPDATE artefact SET locked = 1
FROM (SELECT a.id
FROM view_artefact va
LEFT JOIN view v on v.id = va.view
LEFT JOIN artefact a on a.id = va.artefact
WHERE v.submittedgroup IS NOT NULL AND a.locked = 0) AS subquery
WHERE artefact.id = subquery.id;
More investigation into how the databases ended up with bad data is needed and then a db upgrade change will need to be added to /lib/db/upgrade.php if needed.
Changed in mahara: | |
status: | Confirmed → In Progress |
Changed in mahara: | |
status: | In Progress → Fix Committed |
Changed in mahara: | |
status: | Fix Committed → Fix Released |
Patch for "master" branch: https:/ /reviews. mahara. org/3033