<li>Then extract the ID, DOI, journal, volume, issue, publisher, etc from the CGSpace dump and rename the <code>cg.identifier.doi[en_US]</code> to <code>doi</code> so we can join on it with the Crossref results file:</li>
</span></span><spanstyle="display:flex;"><span>$ csvjoin -c doi /tmp/2023-02-01-cgspace-doi-metadata.csv ~/Downloads/2023-02-01-crossref-results.csv > /tmp/2023-02-01-cgspace-crossref-check.csv
</span></span></code></pre></div><ul>
<li>And import into OpenRefine for analysis and cleaning</li>
<li>I just noticed that Crossref also has types, so we could use that in the future too!</li>
<li>I got a few corrections after examining manually, but I didn’t manage to identify any patterns that I could use to do any automatic matching or cleaning</li>
</ul>
<h2id="2023-02-05">2023-02-05</h2>
<ul>
<li>Normalize text lang attributes in PostgreSQL, run a quick Discovery index, and then export CGSpace to check Initiative mappings and countries/regions</li>
<li>Run all system updates on CGSpace (linode18) and reboot it</li>
</ul>
<h2id="2023-02-06">2023-02-06</h2>
<ul>
<li>Peter said that a new Initiative was approved last month so we need to add it to CGSpace: <code>Fragility, Conflict, and Migration</code></li>
<li>There is lots of discussion about the “issue date” versus “available date” with Enrico and IFPRI, after lots of feedback from the PRMS QA
<ul>
<li>I filed <ahref="https://github.com/AgriculturalSemantics/cg-core/issues/43">an issue on CG Core to propose using <code>dcterms.available</code> as an optional field to indicate the online date</a></li>
</ul>
</li>
</ul>
<h2id="2023-02-07">2023-02-07</h2>
<ul>
<li>IFPRI’s web developer Tony managed to get his Drupal harvester to have a useful user agent:</li>
<li>He also noticed that there is no pagination on POST requests to <code>/rest/items/find-by-metadata-field</code>, and that he needs to increase his timeout for requests that return 100+ results, ie:</li>
<li>I need to ask on the DSpace Slack about this POST pagination</li>
<li>Abenet and Udana noticed that the Handle server was not running
<ul>
<li>Looking in the <code>error.log</code> file I see that the service is complaining about a lock file being present</li>
<li>This is because Linode had to do emergency maintenance on the VM host this morning and the Handle server didn’t shut down properly</li>
</ul>
</li>
<li>I’m having an issue with <code>poetry update</code> so I spent some time debugging and filed <ahref="https://github.com/python-poetry/poetry/issues/7482">an issue</a></li>
<li>Proof and import nine items for the Digital Innovation Inititive for IFPRI
<ul>
<li>There were only some minor issues in the metadata</li>
<li>I also did a duplicate check with <code>check-duplicates.py</code> just in case</li>
</ul>
</li>
<li>I did some minor updates on csv-metadata-quality
<ul>
<li>First, to reduce warnings on non-SPDX licenses like “Copyrighted; all rights reserved” and “Other” since they are very common for us and I’m sick of seeing the warnings</li>
<li>Second, to skip whitespace and newline fixes on the abstract field since so many times they are intended</li>
</ul>
</li>
</ul>
<h2id="2023-02-08">2023-02-08</h2>
<ul>
<li>Make some edits to IFPRI records requested by Jawoo and Leigh</li>
<li>Help Alessandra upload a last minute report for SAPLING</li>
<li>Proof and upload twenty-seven IFPRI records to CGSpace
<ul>
<li>It’s a good thing I did a duplicate check because I found three duplicates!</li>
</ul>
</li>
<li>Export CGSpace to update Initiative mappings and country/region mappings
<li>I killed all locks that were more than a few hours old</li>
<li>Export CGSpace to update Initiative collection mappings</li>
<li>Discuss adding <code>dcterms.available</code> to the submission form
<ul>
<li>I also looked in the <code>dcterms.description</code> field on CGSpace and found ~1,500 items where the is an indication of an online published date</li>
<li>Using some facets in OpenRefine I narrowed down the ones mentioning “online” and then extracted the dates to a new column:</li>
<li>Then to handle formats like “2022-April-26” and “2021-Nov-11” I used some replacement GRELs (note the order so we don’t replace short patterns in longer strings prematurely):</li>
<li>Export CGSpace to do some metadata quality checks
<ul>
<li>I added CGIAR Trust Fund as a donor to some new Initiative outputs</li>
<li>I moved some abstracts from the description field</li>
<li>I moved some version information to the <code>cg.edition</code> field</li>
</ul>
</li>
</ul>
<h2id="2023-02-14">2023-02-14</h2>
<ul>
<li>The PRMS team in Colombia sent some questions about countries on CGSpace
<ul>
<li>I had to fix some, that were clearly wrong, but there is also a difference between CGSpace and MEL because we use mostly iso-codes, and MEL uses the UN M.49 list</li>
<li>Then I re-ran the country code tagger from cgspace-java-helpers, forcing the update on all items in the Initiatives community</li>
</ul>
</li>
<li>Remove Alliance research levers from <code>cg.contributor.crp</code> field after discussing with Daniel and Maria
<ul>
<li>This was a mistake on TIP’s part, and there is no direct mapping between research levers and CRPs</li>
</ul>
</li>
<li>I exported CGSpace to check Initiative collection mappings, regions, and licenses
<ul>
<li>Peter told me that all CGIAR blog posts for the Initiatives should be CC-BY-4.0, and I see the logo at the bottom in light gray!</li>
<li>I had previously missed that and removed some licenses for blog posts</li>
<li>I checked cgiar.org, ifpri.org, icarda.org, iwmi.cgiar.org, irri.org, etc and corrected a handful</li>
<li>Work on rebasing my local DSpace 7 dev branches on top of the latest 7.5-SNAPSHOT
<ul>
<li>It seems the issues I had with the <code>dspace submission-forms-migrate</code> tool in <ahref="/cgspace-notes/2022-08/">August, 2022</a> were fixed</li>
</ul>
</li>
<li>I imported a fresh PostgreSQL snapshot from CGSpace and then removed the Atmire migrations and ran the new migrations as I originally noted in <ahref="/cgspace-notes/2022-03/">March, 2022</a>, and is pointed out in the <ahref="https://wiki.lyrasis.org/display/DSDOC7x/Upgrading+DSpace">DSpace 7 upgrade notes</a>
<ul>
<li>Now I get a new error:</li>
</ul>
</li>
</ul>
<divclass="highlight"><pretabindex="0"style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><codeclass="language-console"data-lang="console"><spanstyle="display:flex;"><span>localhost/dspace7= ☘ DELETE FROM schema_version WHERE version IN ('5.0.2017.09.25', '6.0.2017.01.30', '6.0.2017.09.25');
</span></span><spanstyle="display:flex;"><span>localhost/dspace7= ☘ DELETE FROM schema_version WHERE description LIKE '%Atmire%' OR description LIKE '%CUA%' OR description LIKE '%cua%';
</span></span></span><spanstyle="display:flex;"><span><spanstyle="color:#960050;background-color:#1e0010"></span>CREATE INDEX resourcepolicy_action_idx ON resourcepolicy(action_id)
</span></span></span><spanstyle="display:flex;"><span><spanstyle="color:#960050;background-color:#1e0010"></span> at org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor.handleException(DefaultSqlScriptExecutor.java:275)
</span></span><spanstyle="display:flex;"><span> at org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor.executeStatement(DefaultSqlScriptExecutor.java:222)
</span></span><spanstyle="display:flex;"><span> at org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor.execute(DefaultSqlScriptExecutor.java:126)
</span></span><spanstyle="display:flex;"><span> at org.flywaydb.core.internal.resolver.sql.SqlMigrationExecutor.executeOnce(SqlMigrationExecutor.java:69)
</span></span><spanstyle="display:flex;"><span> at org.flywaydb.core.internal.resolver.sql.SqlMigrationExecutor.lambda$execute$0(SqlMigrationExecutor.java:58)
</span></span><spanstyle="display:flex;"><span> at org.flywaydb.core.internal.database.DefaultExecutionStrategy.execute(DefaultExecutionStrategy.java:27)
</span></span><spanstyle="display:flex;"><span> at org.flywaydb.core.internal.resolver.sql.SqlMigrationExecutor.execute(SqlMigrationExecutor.java:57)
</span></span><spanstyle="display:flex;"><span> at org.flywaydb.core.internal.command.DbMigrate.doMigrateGroup(DbMigrate.java:377)
</span></span><spanstyle="display:flex;"><span> ... 24 more
</span></span><spanstyle="display:flex;"><span> at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2676)
</span></span><spanstyle="display:flex;"><span> at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2366)
</span></span><spanstyle="display:flex;"><span> at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:356)
</span></span><spanstyle="display:flex;"><span> at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:496)
</span></span><spanstyle="display:flex;"><span> at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:413)
</span></span><spanstyle="display:flex;"><span> at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:333)
</span></span><spanstyle="display:flex;"><span> at org.postgresql.jdbc.PgStatement.executeCachedSql(PgStatement.java:319)
</span></span><spanstyle="display:flex;"><span> at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:295)
</span></span><spanstyle="display:flex;"><span> at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:290)
</span></span><spanstyle="display:flex;"><span> at org.apache.commons.dbcp2.DelegatingStatement.execute(DelegatingStatement.java:193)
</span></span><spanstyle="display:flex;"><span> at org.apache.commons.dbcp2.DelegatingStatement.execute(DelegatingStatement.java:193)
</span></span><spanstyle="display:flex;"><span> at org.flywaydb.core.internal.jdbc.JdbcTemplate.executeStatement(JdbcTemplate.java:201)
</span></span><spanstyle="display:flex;"><span> at org.flywaydb.core.internal.sqlscript.ParsedSqlStatement.execute(ParsedSqlStatement.java:95)
</span></span><spanstyle="display:flex;"><span> at org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor.executeStatement(DefaultSqlScriptExecutor.java:210)
</span></span><spanstyle="display:flex;"><span> ... 30 more
</span></span></code></pre></div><ul>
<li>I dropped that index and then the migration succeeded:</li>
</ul>
<divclass="highlight"><pretabindex="0"style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><codeclass="language-console"data-lang="console"><spanstyle="display:flex;"><span>localhost/dspace7= ☘ DROP INDEX resourcepolicy_action_idx;
<li>I think that particular error is because I applied the <ahref="https://github.com/DSpace/DSpace/pull/1792">indexes in this unmerged DSpace 6 patch</a>, so I don’t need to report this as an error in DSpace 7</li>