finding documents having versions

Questions, comments, discussions. Over time certain topics might be moved to their own category.
Post Reply
woec
Posts: 12
Joined: Sun Jun 02, 2019 7:11 am

finding documents having versions

Post by woec »

Hi,
after upgrading mayan to 4.0.15 from 3.5.10, all documents having versions have all versions activated. To correct this, I have to find all documents having versions. How can I find them easily?
woec
SophieGreene
Posts: 1
Joined: Mon Sep 20, 2021 9:18 am

Re: finding documents having versions

Post by SophieGreene »

Oh I need an answer too, help please !!!
User avatar
rosarior
Developer
Developer
Posts: 683
Joined: Tue Aug 21, 2018 3:28 am
Location: Puerto Rico
Contact:

Re: finding documents having versions

Post by rosarior »

woec wrote: Wed Sep 15, 2021 9:27 am Hi,
after upgrading mayan to 4.0.15 from 3.5.10, all documents having versions have all versions activated. To correct this, I have to find all documents having versions. How can I find them easily?
woec
I'm not sure I follow. Do you mean that every document have one active version or that documents with multiple version have all their versions active?
woec
Posts: 12
Joined: Sun Jun 02, 2019 7:11 am

Re: finding documents having versions

Post by woec »

Hi,
The problem is with documents having multiple versions. After upgrade mayan to 4.0.x, all versions of a document are active. To correct this, I have to find all documents having multiple versions and activate the appropriate version. So, I need to find all these documents, which are sparse within the whole collection.
Regards,
woec
gtrot
Posts: 23
Joined: Tue Oct 01, 2019 9:03 pm

Re: finding documents having versions

Post by gtrot »

I had the same situation. I used the following index:

Code: Select all

{% if document.versions.count >= 2 %}Documents with more than one version{% endif %} {% if document.files.count >= 2 %}Documents with more than one file{% endif %}
Guillaume
woec
Posts: 12
Joined: Sun Jun 02, 2019 7:11 am

Re: finding documents having versions

Post by woec »

Thank you very much - that works great and helped me a lot!
woec
Post Reply