Sorting by publication date is broken for migrated records
Bug #920134 reported by
Dan Scott
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
Evergreen | Status tracked in Main | |||||
2.1 |
Fix Released
|
High
|
Unassigned | |||
Main |
Fix Released
|
High
|
Unassigned |
Bug Description
* Evergreen 2.1
The 2.0-2.1 upgrade script doesn't create the "pubdate" attribute in the attrs HSTORE column that is used by "sort by publication date" in the OPAC, leading to inconsistent results when new records are imported or migrated records are edited and thus reingested.
As a quick fix, we ran the following SQL statement over our database, which updated 1.7 million rows in a few minutes:
UPDATE metabib.record_attr
SET attrs = attrs || ('pubdate' => (attrs->'date1'))
WHERE defined(attrs, 'pubdate') IS FALSE
AND defined(attrs, 'date1') IS TRUE;
Changed in evergreen: | |
milestone: | none → 2.1.2 |
To post a comment you must log in.
Pushed user/dbs/ fix_pubdate_ sort_migrated_ recs with updates to the 2.0-2.1 and adding a 2.1.1-2.1.2 version upgrade script to working repo for master; these should be backported to rel_2_1. (Aside, maybe we should adopt the version_upgrade directory in rel_2_1 as well, as it's bizarre not to have the 2.1.0-2.1.1 upgrade script in rel_2_1 as is currently the case).
Didn't do it via the upgrade_db approach because it only affects migrated records, not the base schema. Maybe that's wrong, but it doesn't make much sense to me to increment the upgrade_log number for something that doesn't matter in the least to people creating new database schemas.