Marking a document in the trash in search results

Requests for new functionality or improvements in existing functionality. Please provide clear descriptions of your request, an example or if possible a real life scenario.
Post Reply
qra
50 Posts
50 Posts
Posts: 56
Joined: Fri Oct 25, 2019 9:08 pm
Location: Poland

Marking a document in the trash in search results

Post by qra »

Document search results also include documents from the trash can. Unfortunately, neither the browser nor the API distinguish such documents. I suggest adding some kind of tag to the document card and attributes "in_trash" or "trashed_date_time" to the API function json result.

The same applies to the "Recently accessed" function.
User avatar
michael
Developer
Developer
Posts: 277
Joined: Sun Apr 19, 2020 6:21 am

Re: Marking a document in the trash in search results

Post by michael »

Thanks for the report. We have added a manager that differentiates between trashed and non trashed documents but it seems we missed these areas.
User avatar
michael
Developer
Developer
Posts: 277
Joined: Sun Apr 19, 2020 6:21 am

Re: Marking a document in the trash in search results

Post by michael »

For an update, we have started working on this and expect it to be ready for version 4.1.

Trashed documents are already excluded in the UI via the `.valid` Document model manager. However they are allowed via the API for completed access. After discussion, the team decided that the API, although meant for advanced uses and users, should also exclude trashed documents in the same way as the UI.

For searching trashed documents, we are adding a separate search model. This way trashed documents will be excluded from the normal search, but you will have a way to search for them.

The work is taking place in the branch "features/4.1/remove_trashed_from_api" => https://gitlab.com/mayan-edms/mayan-edm ... d_from_api
Post Reply