SSHOC / sshoc-marketplace-backend

Code for the backend
Apache License 2.0
2 stars 0 forks source link

Revert deleting of an item #435

Closed KlausIllmayer closed 1 week ago

KlausIllmayer commented 6 months ago

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:

I 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

laureD19 commented 4 months ago

blocking curation work (and the need to delete ~1000 items)

tparkola commented 4 months ago

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.

laureD19 commented 3 months ago

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

KlausIllmayer commented 1 month ago

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

tparkola commented 3 weeks ago

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.