Update notes for 2016-07-01

This commit is contained in:
Alan Orth 2016-07-01 16:56:54 +03:00
parent 9bb7a3a50c
commit 1544a5cade
Signed by: alanorth
GPG Key ID: 0FB860CC9C45B1B9
8 changed files with 55 additions and 6 deletions

View File

@ -279,7 +279,7 @@ $ ./delete-metadata-values.py -f dc.contributor.corporate -i Corporate-Authors-D
- Wow, there are 95 authors in the database who have ',' at the end of their name: - Wow, there are 95 authors in the database who have ',' at the end of their name:
``` ```
#select text_value from metadatavalue where metadata_field_id=3 and text_value like '%,'; # select text_value from metadatavalue where metadata_field_id=3 and text_value like '%,';
``` ```
- We need to use something like this to fix them, need to write a proper regex later: - We need to use something like this to fix them, need to write a proper regex later:

View File

@ -9,3 +9,13 @@ image = "../images/bg.jpg"
## 2016-07-01 ## 2016-07-01
- Add `dc.description.sponsorship` to Discovery sidebar facets and make investors clickable in item view ([#232](https://github.com/ilri/DSpace/issues/232)) - Add `dc.description.sponsorship` to Discovery sidebar facets and make investors clickable in item view ([#232](https://github.com/ilri/DSpace/issues/232))
- I think this query should find and replace all authors that have "," at the end of their names (there were 95 matching the select before):
```
dspacetest=# update metadatavalue set text_value = regexp_replace(text_value, '(^.+?),$', '\1') where metadata_field_id=3 and text_value ~ '^.+?,$';
UPDATE 95
dspacetest=# select text_value from metadatavalue where metadata_field_id=3 and text_value ~ '^.+?,$';
text_value
------------
(0 rows)
```

View File

@ -413,7 +413,7 @@ $ ./delete-metadata-values.py -f dc.contributor.corporate -i Corporate-Authors-D
<li>Wow, there are 95 authors in the database who have &lsquo;,&rsquo; at the end of their name:</li> <li>Wow, there are 95 authors in the database who have &lsquo;,&rsquo; at the end of their name:</li>
</ul> </ul>
<pre><code>#select text_value from metadatavalue where metadata_field_id=3 and text_value like '%,'; <pre><code># select text_value from metadatavalue where metadata_field_id=3 and text_value like '%,';
</code></pre> </code></pre>
<ul> <ul>

View File

@ -83,8 +83,17 @@
<ul> <ul>
<li>Add <code>dc.description.sponsorship</code> to Discovery sidebar facets and make investors clickable in item view (<a href="https://github.com/ilri/DSpace/issues/232">#232</a>)</li> <li>Add <code>dc.description.sponsorship</code> to Discovery sidebar facets and make investors clickable in item view (<a href="https://github.com/ilri/DSpace/issues/232">#232</a>)</li>
<li>I think this query should find and replace all authors that have &ldquo;,&rdquo; at the end of their names (there were 95 matching the select before):</li>
</ul> </ul>
<pre><code>dspacetest=# update metadatavalue set text_value = regexp_replace(text_value, '(^.+?),$', '\1') where metadata_field_id=3 and text_value ~ '^.+?,$';
UPDATE 95
dspacetest=# select text_value from metadatavalue where metadata_field_id=3 and text_value ~ '^.+?,$';
text_value
------------
(0 rows)
</code></pre>
</section> </section>
<footer> <footer>

View File

@ -71,9 +71,15 @@
</div> </div>
</header> </header>
<div> <div>
2016-07-01 Add dc.description.sponsorship to Discovery sidebar facets and make investors clickable in item view (#232) 2016-07-01 Add dc.description.sponsorship to Discovery sidebar facets and make investors clickable in item view (#232) I think this query should find and replace all authors that have &ldquo;,&rdquo; at the end of their names (there were 95 matching the select before): dspacetest=# update metadatavalue set text_value = regexp_replace(text_value, '(^.+?),$', '\1') where metadata_field_id=3 and text_value ~ '^.+?,$'; UPDATE 95 dspacetest=# select text_value from metadatavalue where metadata_field_id=3 and text_value ~ '^.+?,$'; text_value
</div> </div>
<footer>
<ul class="pager">
<li class="next"><a href="/cgspace-notes/2016-07/">Read more <span aria-hidden="true">&raquo;</span></a></li>
</ul>
</footer>
</article> </article>

View File

@ -21,7 +21,16 @@
&lt;ul&gt; &lt;ul&gt;
&lt;li&gt;Add &lt;code&gt;dc.description.sponsorship&lt;/code&gt; to Discovery sidebar facets and make investors clickable in item view (&lt;a href=&#34;https://github.com/ilri/DSpace/issues/232&#34;&gt;#232&lt;/a&gt;)&lt;/li&gt; &lt;li&gt;Add &lt;code&gt;dc.description.sponsorship&lt;/code&gt; to Discovery sidebar facets and make investors clickable in item view (&lt;a href=&#34;https://github.com/ilri/DSpace/issues/232&#34;&gt;#232&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;I think this query should find and replace all authors that have &amp;ldquo;,&amp;rdquo; at the end of their names (there were 95 matching the select before):&lt;/li&gt;
&lt;/ul&gt; &lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;dspacetest=# update metadatavalue set text_value = regexp_replace(text_value, &#39;(^.+?),$&#39;, &#39;\1&#39;) where metadata_field_id=3 and text_value ~ &#39;^.+?,$&#39;;
UPDATE 95
dspacetest=# select text_value from metadatavalue where metadata_field_id=3 and text_value ~ &#39;^.+?,$&#39;;
text_value
------------
(0 rows)
&lt;/code&gt;&lt;/pre&gt;
</description> </description>
</item> </item>
@ -367,7 +376,7 @@ $ ./delete-metadata-values.py -f dc.contributor.corporate -i Corporate-Authors-D
&lt;li&gt;Wow, there are 95 authors in the database who have &amp;lsquo;,&amp;rsquo; at the end of their name:&lt;/li&gt; &lt;li&gt;Wow, there are 95 authors in the database who have &amp;lsquo;,&amp;rsquo; at the end of their name:&lt;/li&gt;
&lt;/ul&gt; &lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;#select text_value from metadatavalue where metadata_field_id=3 and text_value like &#39;%,&#39;; &lt;pre&gt;&lt;code&gt;# select text_value from metadatavalue where metadata_field_id=3 and text_value like &#39;%,&#39;;
&lt;/code&gt;&lt;/pre&gt; &lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt; &lt;ul&gt;

View File

@ -75,9 +75,15 @@
</div> </div>
</header> </header>
<div> <div>
2016-07-01 Add dc.description.sponsorship to Discovery sidebar facets and make investors clickable in item view (#232) 2016-07-01 Add dc.description.sponsorship to Discovery sidebar facets and make investors clickable in item view (#232) I think this query should find and replace all authors that have &ldquo;,&rdquo; at the end of their names (there were 95 matching the select before): dspacetest=# update metadatavalue set text_value = regexp_replace(text_value, '(^.+?),$', '\1') where metadata_field_id=3 and text_value ~ '^.+?,$'; UPDATE 95 dspacetest=# select text_value from metadatavalue where metadata_field_id=3 and text_value ~ '^.+?,$'; text_value
</div> </div>
<footer>
<ul class="pager">
<li class="next"><a href="/cgspace-notes/2016-07/">Read more <span aria-hidden="true">&raquo;</span></a></li>
</ul>
</footer>
</article> </article>

View File

@ -21,7 +21,16 @@
&lt;ul&gt; &lt;ul&gt;
&lt;li&gt;Add &lt;code&gt;dc.description.sponsorship&lt;/code&gt; to Discovery sidebar facets and make investors clickable in item view (&lt;a href=&#34;https://github.com/ilri/DSpace/issues/232&#34;&gt;#232&lt;/a&gt;)&lt;/li&gt; &lt;li&gt;Add &lt;code&gt;dc.description.sponsorship&lt;/code&gt; to Discovery sidebar facets and make investors clickable in item view (&lt;a href=&#34;https://github.com/ilri/DSpace/issues/232&#34;&gt;#232&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;I think this query should find and replace all authors that have &amp;ldquo;,&amp;rdquo; at the end of their names (there were 95 matching the select before):&lt;/li&gt;
&lt;/ul&gt; &lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;dspacetest=# update metadatavalue set text_value = regexp_replace(text_value, &#39;(^.+?),$&#39;, &#39;\1&#39;) where metadata_field_id=3 and text_value ~ &#39;^.+?,$&#39;;
UPDATE 95
dspacetest=# select text_value from metadatavalue where metadata_field_id=3 and text_value ~ &#39;^.+?,$&#39;;
text_value
------------
(0 rows)
&lt;/code&gt;&lt;/pre&gt;
</description> </description>
</item> </item>
@ -367,7 +376,7 @@ $ ./delete-metadata-values.py -f dc.contributor.corporate -i Corporate-Authors-D
&lt;li&gt;Wow, there are 95 authors in the database who have &amp;lsquo;,&amp;rsquo; at the end of their name:&lt;/li&gt; &lt;li&gt;Wow, there are 95 authors in the database who have &amp;lsquo;,&amp;rsquo; at the end of their name:&lt;/li&gt;
&lt;/ul&gt; &lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;#select text_value from metadatavalue where metadata_field_id=3 and text_value like &#39;%,&#39;; &lt;pre&gt;&lt;code&gt;# select text_value from metadatavalue where metadata_field_id=3 and text_value like &#39;%,&#39;;
&lt;/code&gt;&lt;/pre&gt; &lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt; &lt;ul&gt;