Add notes for 2018-06-13

This commit is contained in:
Alan Orth 2018-06-13 09:22:58 +03:00
parent 982ed47d55
commit 22a4819f36
Signed by: alanorth
GPG Key ID: 0FB860CC9C45B1B9
3 changed files with 80 additions and 11 deletions

View File

@ -187,4 +187,37 @@ or(
- https://dspacetest.cgiar.org/10568/96118 - https://dspacetest.cgiar.org/10568/96118
- https://dspacetest.cgiar.org/10568/96113 - https://dspacetest.cgiar.org/10568/96113
## 2018-06-13
- Elizabeth from CIAT contacted me to ask if I could add ORCID identifiers to all of Robin Buruchara's items
- I used my [add-orcid-identifiers-csv.py](https://gist.githubusercontent.com/alanorth/a49d85cd9c5dea89cddbe809813a7050/raw/f67b6e45a9a940732882ae4bb26897a9b245ef31/add-orcid-identifiers-csv.py) script:
```
$ ./add-orcid-identifiers-csv.py -i 2018-06-13-Robin-Buruchara.csv -db dspace -u dspace -p 'fuuu'
```
- The contents of `2018-06-13-Robin-Buruchara.csv` were:
```
dc.contributor.author,cg.creator.id
"Buruchara, Robin",Robin Buruchara: 0000-0003-0934-1218
"Buruchara, Robin A.",Robin Buruchara: 0000-0003-0934-1218
```
- On a hunch I checked to see if CGSpace's bitstream cleanup was working properly and of course it's broken:
```
$ dspace cleanup -v
...
Error: ERROR: update or delete on table "bitstream" violates foreign key constraint "bundle_primary_bitstream_id_fkey" on table "bundle"
Detail: Key (bitstream_id)=(152402) is still referenced from table "bundle".
```
- As always, the solution is to delete that ID manually in PostgreSQL:
```
$ psql dspace -c 'update bundle set primary_bitstream_id=NULL where primary_bitstream_id in (152402);'
UPDATE 1
```
# vim: set sw=2 ts=2: # vim: set sw=2 ts=2:

View File

@ -41,7 +41,7 @@ sys 2m7.289s
<meta property="article:published_time" content="2018-06-04T19:49:54-07:00"/> <meta property="article:published_time" content="2018-06-04T19:49:54-07:00"/>
<meta property="article:modified_time" content="2018-06-11T15:21:14&#43;03:00"/> <meta property="article:modified_time" content="2018-06-12T10:42:43&#43;03:00"/>
@ -93,9 +93,9 @@ sys 2m7.289s
"@type": "BlogPosting", "@type": "BlogPosting",
"headline": "June, 2018", "headline": "June, 2018",
"url": "https://alanorth.github.io/cgspace-notes/2018-06/", "url": "https://alanorth.github.io/cgspace-notes/2018-06/",
"wordCount": "1462", "wordCount": "1587",
"datePublished": "2018-06-04T19:49:54-07:00", "datePublished": "2018-06-04T19:49:54-07:00",
"dateModified": "2018-06-11T15:21:14&#43;03:00", "dateModified": "2018-06-12T10:42:43&#43;03:00",
"author": { "author": {
"@type": "Person", "@type": "Person",
"name": "Alan Orth" "name": "Alan Orth"
@ -377,11 +377,47 @@ Failed to startup the DSpace Service Manager: failure starting up spring service
<li><a href="https://dspacetest.cgiar.org/10568/96184">https://dspacetest.cgiar.org/10568/96184</a></li> <li><a href="https://dspacetest.cgiar.org/10568/96184">https://dspacetest.cgiar.org/10568/96184</a></li>
<li><a href="https://dspacetest.cgiar.org/10568/96141">https://dspacetest.cgiar.org/10568/96141</a></li> <li><a href="https://dspacetest.cgiar.org/10568/96141">https://dspacetest.cgiar.org/10568/96141</a></li>
<li><a href="https://dspacetest.cgiar.org/10568/96118">https://dspacetest.cgiar.org/10568/96118</a></li> <li><a href="https://dspacetest.cgiar.org/10568/96118">https://dspacetest.cgiar.org/10568/96118</a></li>
<li><a href="https://dspacetest.cgiar.org/10568/96113">https://dspacetest.cgiar.org/10568/96113</a> <li><a href="https://dspacetest.cgiar.org/10568/96113">https://dspacetest.cgiar.org/10568/96113</a></li>
<br /></li>
</ul></li> </ul></li>
</ul> </ul>
<h2 id="2018-06-13">2018-06-13</h2>
<ul>
<li>Elizabeth from CIAT contacted me to ask if I could add ORCID identifiers to all of Robin Buruchara&rsquo;s items</li>
<li>I used my <a href="https://gist.githubusercontent.com/alanorth/a49d85cd9c5dea89cddbe809813a7050/raw/f67b6e45a9a940732882ae4bb26897a9b245ef31/add-orcid-identifiers-csv.py">add-orcid-identifiers-csv.py</a> script:</li>
</ul>
<pre><code>$ ./add-orcid-identifiers-csv.py -i 2018-06-13-Robin-Buruchara.csv -db dspace -u dspace -p 'fuuu'
</code></pre>
<ul>
<li>The contents of <code>2018-06-13-Robin-Buruchara.csv</code> were:</li>
</ul>
<pre><code>dc.contributor.author,cg.creator.id
&quot;Buruchara, Robin&quot;,Robin Buruchara: 0000-0003-0934-1218
&quot;Buruchara, Robin A.&quot;,Robin Buruchara: 0000-0003-0934-1218
</code></pre>
<ul>
<li>On a hunch I checked to see if CGSpace&rsquo;s bitstream cleanup was working properly and of course it&rsquo;s broken:</li>
</ul>
<pre><code>$ dspace cleanup -v
...
Error: ERROR: update or delete on table &quot;bitstream&quot; violates foreign key constraint &quot;bundle_primary_bitstream_id_fkey&quot; on table &quot;bundle&quot;
Detail: Key (bitstream_id)=(152402) is still referenced from table &quot;bundle&quot;.
</code></pre>
<ul>
<li>As always, the solution is to delete that ID manually in PostgreSQL:</li>
</ul>
<pre><code>$ psql dspace -c 'update bundle set primary_bitstream_id=NULL where primary_bitstream_id in (152402);'
UPDATE 1
</code></pre>
<h1 id="vim-set-sw-2-ts-2">vim: set sw=2 ts=2:</h1> <h1 id="vim-set-sw-2-ts-2">vim: set sw=2 ts=2:</h1>

View File

@ -4,7 +4,7 @@
<url> <url>
<loc>https://alanorth.github.io/cgspace-notes/2018-06/</loc> <loc>https://alanorth.github.io/cgspace-notes/2018-06/</loc>
<lastmod>2018-06-11T15:21:14+03:00</lastmod> <lastmod>2018-06-12T10:42:43+03:00</lastmod>
</url> </url>
<url> <url>
@ -169,7 +169,7 @@
<url> <url>
<loc>https://alanorth.github.io/cgspace-notes/</loc> <loc>https://alanorth.github.io/cgspace-notes/</loc>
<lastmod>2018-06-11T15:21:14+03:00</lastmod> <lastmod>2018-06-12T10:42:43+03:00</lastmod>
<priority>0</priority> <priority>0</priority>
</url> </url>
@ -180,7 +180,7 @@
<url> <url>
<loc>https://alanorth.github.io/cgspace-notes/tags/notes/</loc> <loc>https://alanorth.github.io/cgspace-notes/tags/notes/</loc>
<lastmod>2018-06-11T15:21:14+03:00</lastmod> <lastmod>2018-06-12T10:42:43+03:00</lastmod>
<priority>0</priority> <priority>0</priority>
</url> </url>
@ -192,13 +192,13 @@
<url> <url>
<loc>https://alanorth.github.io/cgspace-notes/posts/</loc> <loc>https://alanorth.github.io/cgspace-notes/posts/</loc>
<lastmod>2018-06-11T15:21:14+03:00</lastmod> <lastmod>2018-06-12T10:42:43+03:00</lastmod>
<priority>0</priority> <priority>0</priority>
</url> </url>
<url> <url>
<loc>https://alanorth.github.io/cgspace-notes/tags/</loc> <loc>https://alanorth.github.io/cgspace-notes/tags/</loc>
<lastmod>2018-06-11T15:21:14+03:00</lastmod> <lastmod>2018-06-12T10:42:43+03:00</lastmod>
<priority>0</priority> <priority>0</priority>
</url> </url>