mirror of
https://github.com/alanorth/cgspace-notes.git
synced 2025-01-27 05:49:12 +01:00
Update notes for 2019-03-14
This commit is contained in:
@ -154,6 +154,31 @@ if(isBlank(value), 'PLANT PRODUCTION & HEALTH', value + '||PLANT PRODUCTION & HE
|
||||
- CGSpace had the same issue with blank items like earlier this month and I restarted Tomcat to fix it
|
||||
- Create a pull request to change Swaziland to Eswatini and Macedonia to North Macedonia ([#414](https://github.com/ilri/DSpace/pull/414))
|
||||
- I see thirty-six items using Swaziland country metadata, and Peter says we should change only those from 2018 and 2019
|
||||
- I think that I could get the resource IDs from SQL and then export them using `dspace metadata-export`...
|
||||
- This is a bit ugly, but it works (using the [DSpace 5 SQL helper function](https://wiki.duraspace.org/display/DSPACE/Helper+SQL+functions+for+DSpace+5) to resolve ID to handle):
|
||||
|
||||
```
|
||||
for id in $(psql -U postgres -d dspacetest -h localhost -c "SELECT resource_id FROM metadatavalue WHERE resource_type_id=2 AND metadata_field_id=228 AND text_value LIKE '%SWAZILAND%'" | grep -oE '[0-9]{3,}'); do
|
||||
|
||||
echo "Getting handle for id: ${id}"
|
||||
|
||||
handle=$(psql -U postgres -d dspacetest -h localhost -c "SELECT ds5_item2itemhandle($id)" | grep -oE '[0-9]{5}/[0-9]+')
|
||||
|
||||
~/dspace/bin/dspace metadata-export -f /tmp/${id}.csv -i $handle
|
||||
|
||||
done
|
||||
```
|
||||
|
||||
- Then I couldn't figure out a clever way to join all the CSVs, so I just grepped them to find the IDs with dates from 2018 and 2019 and there are apparently only three:
|
||||
|
||||
```
|
||||
$ grep -oE '201[89]' /tmp/*.csv | sort -u
|
||||
/tmp/94834.csv:2018
|
||||
/tmp/95615.csv:2018
|
||||
/tmp/96747.csv:2018
|
||||
```
|
||||
|
||||
- And looking at those items more closely, only one of them has an *issue date* of after 2018-04, so I will only update that one (as the countrie's name only changed in 2018-04)
|
||||
- Run all system updates and reboot linode20
|
||||
- Follow up with Felix from Earlham to see if he's done testing DSpace Test with COPO so I can re-sync the server from CGSpace
|
||||
|
||||
|
Reference in New Issue
Block a user