God dag Jacob,

Perhaps there is an issue in the workflow step rejection logic, where it
isn't considering the mapped collection, only the primary collection. That
would be wise for someone to look into.

Unfortunately, your item is in a weird state, and I think you'll need to
use SQL to manually delete this item.

First, try to directly access this item, and delete it from DSpace:
http://example.edu/xmlui/admin/item
Use itemID of: 29244

If that doesn't work, here is some SQL that might help you get further. The
safest route to follow would be to make a backup of your database, and set
up a testing instance of your DSpace, and practice the following advice on
your testing instance of DSpace. If that succeeds, then consider doing it
on the production instance.

## See which collections this item is connected to:
SELECT * FROM public.collection2item WHERE collection2item.item_id = 29244;

That might return you two records. Maybe one with collection_id of 10, and
another with collection_id of 20. If you figure out which of those
collectionID's correspond to the secondary/mapped collection, you might be
able to just delete the secondary mapping (leaving the item connected to
the primary collection).

## Delete the second collection from being connected (assuming
collection_id 20 is the second collection).
BEGIN;
DELETE FROM public.collection2item WHERE collection2item.item_id = 29244
AND collection2item.collection_id = 20;
COMMIT;

Then, try to go back to where you were using DSpace to delete the item.
It's best if DSpace can do the item deletion, since there are a lot of
database relationships to catch.

Hope this helps


________________
Peter Dietz
Longsight
www.longsight.com
pe...@longsight.com
p: 740-599-5005 x809

On Fri, Sep 26, 2014 at 4:34 AM, Jacob Andersson <jacob.anders...@mah.se>
wrote:

>  Hej!
>
>
>
> I did a csv-file import where I entered two values in the collection
> column. This imports the item to the first collection and maps it to the
> second collection. The import was made into the workflows of the
> collections.
>
>
>
> In the workflow the item was rejected back to me. I then tried to remove
> the submission, which resulted in the following error:
>
>
>
>
>
> * org.postgresql.util.PSQLException: ERROR: update or delete on table
> "item" violates foreign key constraint "coll2item_item_fk" on table
> "collection2item" Detail: Key (item_id)=(29244) is still referenced from
> table "collection2item".*
>
>
>
> I’m assuming it’s because the item has a mapping to a second collection.
>
>
>
> So, I can’t remove the submission.
>
>
>
> I can also not delete the test-collections I created for this test-import:
>
>
>
>
> *org.postgresql.util.PSQLException: ERROR: update or delete on table
> "item" violates foreign key constraint "$1" on table "workspaceitem"
> Detail: Key (item_id)=(29244) is still referenced from table
> "workspaceitem".*
>
>
>
>
>
> /Jacob
>
>
>
>
>
> -----------------------
>
> Jacob Andersson
>
> Librarian
>
> Library & IT
>
> Malmö University
>
> 205 06 Malmö
>
> Sweden
>
> +46-(0)40-66 58387
>
> jacob.anders...@mah.se
>
>
>
>
> ------------------------------------------------------------------------------
> Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
> Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
> Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
> Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
>
> http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
> _______________________________________________
> DSpace-tech mailing list
> DSpace-tech@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/dspace-tech
> List Etiquette:
> https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette
>
------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
_______________________________________________
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech
List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette

Reply via email to