Closed KlausIllmayer closed 1 week ago
blocking curation work (and the need to delete ~1000 items)
After quick investigation I see that deleted item is treated as non-existent in many cases (kind of understandable), hence:
Anyway we can start maybe with the intention you have when working with items - why would you during the curation work first delete an item and then wanted to have it back again, especially considering ~1000 items? We could also have a short call about that.
thanks for looking into this Tomasz!
Reasons to revert deleted items:
Does it help?
In that regard, I think it would be important to allow to revert the last version of a deleted item to a new version with an approved
status
It could work like this: we agree that reverting an item does set it always to APPROVED and the administrators doing this revert need to be aware about this (that is not very clean but a pragmatic approach) => we agreed on this approach
Done. Only admin can revert. When reverting: item's status is set to APPROVED, its versioned item's status is set to REVIEWED, and its active param is set to true.
Long time ago we discussed the possibility to revert a deleted item back to an active state in MP: https://gitlab.gwdg.de/sshoc/sshoc-marketplace-backend/-/issues/163 We tried to find a way to revert such a deleted item but we were not successful. It seems, that this is not implemented or is blocked by 404 errors. What we tried:
GET /api/deleted-items
and find the persistentId and versionId (remark: there are problems with this endpoint regarding the order-parameter, which does not work proper at least for thelabel
value; additionally, I have problems when trying to get to the last page: it will show further pages, but only on the last page and I can also put high numbers inside the page-value, e.g. 55 which will then open the page 5 - maybe something to look more into, otherwise it is not easy to find a deleted item - btw: a search for label would be great)PUT /api/tools-services/{persistentId}/versions/{versionId}/revert
but delivers a 404 errorPUT
/api/tools-services/{persistentId}` gives also a 404 errorI don't see any further endpoints that could do the trick. @tparkola Can you look into the code, if we miss something or if the revert of deleted items is simple not implemented.
Notify @laureD19 about the issue