mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-17 15:03:18 +00:00
DS-466 : Just realized the code fixed in r5887 appears in two places -- both in ingestAll() and in replaceAll(). It was fixed in ingestAll() in r5887. This commit also ensures it is fixed in replaceAll() method.
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@5893 9c30dcfa-912a-0410-8fc2-9e0234be79fd
This commit is contained in:
@@ -273,8 +273,14 @@ public abstract class AbstractPackageIngester
|
|||||||
// A Collection can map to Items that it does not "own".
|
// A Collection can map to Items that it does not "own".
|
||||||
// If a Collection package has an Item as a child, it
|
// If a Collection package has an Item as a child, it
|
||||||
// should be mapped regardless of ownership.
|
// should be mapped regardless of ownership.
|
||||||
if (Constants.COLLECTION == replacedDso.getType())
|
|
||||||
|
// If a Collection package has an Item as a child, it
|
||||||
|
// should be mapped regardless of ownership.
|
||||||
|
// Note: Only perform this mapping if new items were ingested to this collection
|
||||||
|
if (Constants.COLLECTION == replacedDso.getType() && dsoIngestedList.size()>oldSize)
|
||||||
{
|
{
|
||||||
|
// Since running 'replaceAll' on an item, will only ingest one Item at most,
|
||||||
|
// Just make sure that item is mapped to this collection.
|
||||||
Item childItem = (Item)dsoIngestedList.get(oldSize);
|
Item childItem = (Item)dsoIngestedList.get(oldSize);
|
||||||
Collection collection = (Collection)replacedDso;
|
Collection collection = (Collection)replacedDso;
|
||||||
if (!childItem.isIn(collection))
|
if (!childItem.isIn(collection))
|
||||||
|
Reference in New Issue
Block a user