How to hide empty index levels?

When things don't work as they should.
Post Reply
joh-ku
Posts: 4
Joined: Thu Jun 04, 2020 11:31 am

How to hide empty index levels?

Post by joh-ku »

The following situation: two document types given and both have access to an index, which references a metadata type "X". Now, I upload a new document, apply one of the given document types to it and set a metadata value "Y" for the mentioned metadata type X. With access to the applied document type (only), I see the uploaded document and my index properly shows this document under a level Y as well. However, the problem is, when I take a look at this index with my second document type (only), I can still see the index level Y, but of course no document, because it is bound to the other document type. How can I hide those empty levels and show them only to the relevant document types (relevant = having ≥ 1 documents under a given index level)?

User avatar
michael
Developer
Developer
Posts: 26
Joined: Sun Apr 19, 2020 6:21 am

Re: How to hide empty index levels?

Post by michael »

Interesting use case.

I don't have an answer right away but will look into it and pass along my suggestion to the other members of the team.

To make I understand, you are seeing empty index level entries in the index view of a document, because that document's type is sharing an index with another document type.

joh-ku
Posts: 4
Joined: Thu Jun 04, 2020 11:31 am

Re: How to hide empty index levels?

Post by joh-ku »

Exactly, both document types have access to one and the same index, lets say it's called "company name". Now, i upload a document with my first document type and assign "Microsoft" as value for "company name". After that, both document types see an index "Microsoft", but only the document type which has uploaded the document and has access to it accordingly, can actually see the document itself underneath this index (the other document type sees an empty index "Microsoft" with no document underneath - "all documents" = 0).

My expectation however would be, that a document type only sees (is allowed to see) those indeces, which already have at least one document assigned to it for the given document type.

User avatar
franco
Developer
Developer
Posts: 29
Joined: Sun Apr 05, 2020 2:30 am

Re: How to hide empty index levels?

Post by franco »

He have reached a solution and ticket number 839 (https://gitlab.com/mayan-edms/mayan-edms/-/issues/839) has been filed to track and update this.

Thanks for the report.

joh-ku
Posts: 4
Joined: Thu Jun 04, 2020 11:31 am

Re: How to hide empty index levels?

Post by joh-ku »

Thank you very much for your efforts and support!

Post Reply