DSpace/DSpace — pull request #798 by antoine-atmire (2014-12-12 13:10:12+00:00)
Title: DS-2330 bug fix: lost authors when using ORCID column

https://jira.duraspace.org/browse/DS-2330

org/dspace/app/bulkedit/MetadataImport.java:489 -> a metadata with confidence -1 will never be matched as constant, which means it will be deleted+added.
-> so we changed the export to give them 600 instead of -1

The core issue was the second column for the same metadata field.
When comparing the existing metadata to the provided metadata, DSpace would notice that the existing authors were not present in the ORCID:dc.contributor.author column and would remove all of them.
-> Fixed it by disabling removing metadata for columns with an external authority source prefix like "ORCID:".
Metadata can still be removed by omitting them from the regular dc.contributor.author column.

There was still a bug when removing an author like that an reimporting it with the "ORCID:"-column. (Which would be the way to virtually add the orcid to the existing metadata)
Depending on the order of the columns it may delete and reimport it or not, but it would not report correctly on what it has done.
-> I fixed it by putting an comparator on the DSpaceCSVLine headers ("ORCID:"-like columns should come last)
+ -> when recording changes from the "ORCID:"-column, the changes are compared to the regular "dc.contributor.author" column instead of comparing with the existing item's metadata (because they should be replaced by the other column's values by the time this column gets processed)