Erroneous, duplicate item mappings

32 views
Skip to first unread message

Alan Orth

unread,
Jan 9, 2017, 11:17:36 AM1/9/17
to DSpace Technical Support
Hello,

Has anyone ever had issues with duplicate item mappings? We have an item that has been mapped to the same collection 184 times (really). I doubt the editor did this on purpose!

We are running DSpace 5.5 with XMLUI on PostgreSQL 9.5.

Thanks,
Screen Shot 2017-01-09 at 17.59.32-fs8.png
--

Alan Orth

unread,
Jan 10, 2017, 8:19:28 AM1/10/17
to DSpace Technical Support
Hello,

I tried to remedy this by exporting the item's metadata as CSV, deleting the duplicate mappings in the file, and re-importing, but DSpace says that "no changes were detected". Does anyone have any ideas about this?

Thanks,

Alan Orth

unread,
Jan 10, 2017, 8:54:48 AM1/10/17
to DSpace Technical Support
Hello,

I found an older thread (by Shaun Donovan, 2014) on the list discussing this issue and he offered some SQL commands for exploring the mappings of an item:

    dspace=# select * from collection2item where item_id = '80596';

Using that, I removed all mappings except the legitimate ones:

    dspace=# delete from collection2item where item_id = '80596' and id not in (90792, 90806, 90807);

After refreshing the item view for the particular item I now see only the three correct mappings remaining. Is this solution sufficient, or are there some other relationships I should take care of in the database?

Thank you,

Alan Orth

unread,
Aug 6, 2020, 4:03:13 AM8/6/20
to DSpace Technical Support
Dear list,

Duplicate mappings continue to be a minor annoyance for us. It was brought to my attention by someone consuming our content via the REST API that items with duplicate mappings behave strangely in the REST API:
$ http 'http://localhost:8080/rest/collections/1445' | json_pp | grep numberItems
   "numberItems" : 63,
$ http 'http://localhost:8080/rest/collections/1445/items' jq '. | length'
61
In this case the collection had two items that were mapped twice. So my question is this: is there any legitimate reason to allow duplicate mappings? I'm thinking of trying to write a curation task or database query to programmatically find and fix these... should I create a GitHub issue for this?
Regards,
Reply all
Reply to author
Forward
0 new messages