OK Hilton, we'll have to wait for the actual fix in code, but here's
how you can fix the affected items. I did only very basic testing, so
make sure to double test this outside of production and make a backup
of your database. Let me know whether it works fine and I'll add it to
the Jira issue, as the affected users will need to run this to fix the
items added while they were running the buggy code.

Find the affected items:

SELECT handle, text_value AS current, 'http://hdl.handle.net/'||handle as fixed
FROM metadatavalue, metadatafieldregistry, handle
WHERE text_value = 'http://hdl.handle.net/10019'
AND metadatafieldregistry.metadata_field_id = metadatavalue.metadata_field_id
AND metadatafieldregistry.element = 'identifier'
AND metadatafieldregistry.qualifier = 'uri'
AND handle.resource_type_id = 2
AND handle.resource_id = metadatavalue.item_id;


Fix the affected items:

UPDATE metadatavalue
SET text_value = 'http://hdl.handle.net/14'||handle
FROM metadatafieldregistry, handle
WHERE text_value = 'http://hdl.handle.net/10019'
AND metadatafieldregistry.metadata_field_id = metadatavalue.metadata_field_id
AND metadatafieldregistry.element = 'identifier'
AND metadatafieldregistry.qualifier = 'uri'
AND handle.resource_type_id = 2
AND handle.resource_id = metadatavalue.item_id



Regards,
~~helix84

Compulsory reading: DSpace Mailing List Etiquette
https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette

------------------------------------------------------------------------------
WatchGuard Dimension instantly turns raw network data into actionable 
security intelligence. It gives you real-time visual feedback on key
security issues and trends.  Skip the complicated setup - simply import
a virtual appliance and go from zero to informed in seconds.
http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk
_______________________________________________
DSpace-tech mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-tech
List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette

Reply via email to