$ psql dspacenew -x -c 'select element, qualifier, scope_note from metadatafieldregistry where metadata_schema_id=5 order by element, qualifier;' | sed -r 's:^-\[ RECORD (.*) \]-+$:</dc-type>\n<dc-type>\n<schema>cg</schema>:;s:([^ ]*) +\| (.*): <\1>\2</\1>:;s:^$:</dc-type>:;1s:</dc-type>\n::'
- Abenet says the ILRI board wants to be able to have "lead author" for every item, so I've whipped up a WIP test in the `5_x-lead-author` branch
- It works but is still very rough and we haven't thought out the whole lifecycle yet
![Testing lead author in submission form](/cgspace-notes/2017/07/lead-author-test.png)
- I assume that "lead author" would actually be the first question on the item submission form
- We also need to check to see which ORCID authority core this uses, because it seems to be using an entirely new one rather than the one for `dc.contributor.author` (which makes sense of course, but fuck, all the author problems aren't bad enough?!)
- Also would need to edit XMLUI item displays to incorporate this into authors list
- And fuck, then anyone consuming our data via REST / OAI will not notice that we have an author outside of `dc.contributor.authors`... ugh
- What if we modify the item submission form to use [`type-bind` fields to show/hide certain fields depending on the type](https://wiki.duraspace.org/display/DSDOC5x/Submission+User+Interface#SubmissionUserInterface-ItemtypeBasedMetadataCollection)?
- Adjust WLE Research Theme to include both Phase I and II on the submission form according to editor feedback ([#330](https://github.com/ilri/DSpace/pull/330))
- Generate list of fields in the current CGSpace `cg` scheme so we can record them properly in the metadata registry:
```
$ psql dspace -x -c 'select element, qualifier, scope_note from metadatafieldregistry where metadata_schema_id=2 order by element, qualifier;' | sed -r 's:^-\[ RECORD (.*) \]-+$:</dc-type>\n<dc-type>\n<schema>cg</schema>:;s:([^ ]*) +\| (.*): <\1>\2</\1>:;s:^$:</dc-type>:;1s:</dc-type>\n::' > cg-types.xml
org.postgresql.util.PSQLException: FATAL: remaining connection slots are reserved for non-replication superuser connections
```
- Looking at the `pg_stat_activity` table I saw there were indeed 98 active connections to PostgreSQL, and at this time the limit is 100, so that makes sense
- Tsega restarted Tomcat and it's working now
- Abenet said she was generating a report with Atmire's CUA module, so it could be due to that?
- Looking in the logs I see this random error again that I should report to DSpace:
```
2017-07-05 13:50:07,196 ERROR org.dspace.statistics.SolrLogger @ COUNTRY ERROR: EU
```
- Seems to come from `dspace-api/src/main/java/org/dspace/statistics/SolrLogger.java`
- Sisay tried to help by making a [pull request for the RTB flagships](https://github.com/ilri/DSpace/pull/331) but there are formatting errors, unrelated changes, and the flagship names are not in the style I requested
- Remove `UKaid` from the controlled vocabulary for `dc.description.sponsorship`, as `Department for International Development, United Kingdom` is the correct form and it is already present ([#334](https://github.com/ilri/DSpace/pull/334))