Version 3.5.4

Released: December 14, 2020

Changes

Docker

Added the libarchive-zip-perl to the Docker image to allow EXIFTOOL to retrieve Zip file metadata.

Updated the Docker image’s Debian version from version 10.5 to 10.7.

Documents

Documents stubs without a label will now display their ID as the label. This allows documents without versions to be accessible via the user interface.

The misc_models.py models module was split into different modules with more descriptive names.

There is now stricter filtering and permission checking for duplicated documents. Users now need the document view permission for all duplicated documents for any of them to show up in the duplicated document list. The duplicate count column now performs filtering and will only show the count of duplicated documents that the user can access.

The way trashed documents were handled was improved. Trashed documents are now filtered from all views that show documents or allow document actions.

Events

The event list for the user event type subscription list is now sorted by namespace label and event type label.

Icons were added to the “mark notification as seen” and “mark all notification as seen” links.

REST API

The API end point enumeration API view was improved. It will continue to show the same results but does so with a more intuitive internal logic when extending.

Settings

Django settings exposed from inside Mayan EDMS now use Django’s global_settings module instead of the settings module which is not ready at the time the default are computed.

Views

The .get_external_object_queryset method was improved to ensure that the queryset passed to the reusable views is always up to date when the view is accessed at runtime.

Workflows

The workflow instance access requirements was updated to match the intended layout and the current REST API layout. In order to view the list of log entries and the list of workflow instances of a document, the workflow view permission is now required for the document as well as the workflow template. This double permission requirement now matches the same design as the metadata and tags apps.

The necessary API endpoints to expose the workflow transition fields model were added.

Other

All static values from settings.py modules were moved to the literals modules with descriptive variable names.

The events test mixins was updated to allow returning either, one, many or all events during a test.

Test that do not rely on document content were updated to use document stubs instead. This results in a test suit speed up of 20% and overall lower memory usage.

Switched the base image of the GitLab CI file from Ubuntu 19.10 to Debian 10.7. The same base image as the Docker image.

Removals

  • None

Upgrading process

Upgrading from Mayan EDMS 3.2.x or earlier

  1. Stop supervisord:

    sudo systemctl stop supervisor
    
  2. Update the Redis configuration:

    Configure Redis to discard data when it runs out of memory, not save its database, and only keep 2 database:

    echo "maxmemory-policy allkeys-lru" | sudo tee -a /etc/redis/redis.conf
    echo "save \"\"" | sudo tee -a /etc/redis/redis.conf
    echo "databases 2" | sudo tee -a /etc/redis/redis.conf
    echo "requirepass mayanredispassword" | sudo tee -a /etc/redis/redis.conf
    sudo systemctl restart redis
    
  3. Install the Python 3 development OS package:

    sudo apt-get install python3-dev
    
  4. Update the virtualenv to use Python 3:

    sudo -u mayan virtualenv --clear /opt/mayan-edms -p /usr/bin/python3
    
  5. Create a home directory for the Mayan EDMS system user:

    mkdir /home/mayan
    
  6. Grant ownership to the Mayan EDMS system user:

    chown mayan:mayan /home/mayan
    
  7. Reinstall the Python client for PostgreSQL and Redis:

    sudo -u mayan /opt/mayan-edms/bin/pip install psycopg2==3.1.14 redis==5.0.3
    

    Note

    Platforms with the ARM CPU might also need additional requirements:

    sudo -u mayan /opt/mayan-edms/bin/pip install psutil==5.8.0
    
  8. Reinstall the Python client for RabbitMQ if you are using RabbitMQ as a broker:

    sudo -u mayan /opt/mayan-edms/bin/pip install amqp==5.2.0
    

Upgrading from Mayan EDMS 3.4.x or 3.3.x

  1. Stop supervisord:

    sudo systemctl stop supervisor
    
  2. Upgrade to the latest pip version:

    sudo -u mayan /opt/mayan-edms/bin/pip install -U pip
    
  3. Update the Redis configuration to enable password protection:

    echo "requirepass mayanredispassword" | sudo tee -a /etc/redis/redis.conf
    sudo systemctl restart redis
    
  4. Remove deprecated requirements:

    sudo -u mayan curl https://gitlab.com/mayan-edms/mayan-edms/raw/master/removals.txt -o /tmp/removals.txt \
    && sudo -u mayan /opt/mayan-edms/bin/pip uninstall -y -r /tmp/removals.txt
    
  5. Update the Mayan EDMS Python package:

    sudo -u mayan /opt/mayan-edms/bin/pip install mayan-edms==3.5.4
    

    the requirements will also be updated automatically.

  6. Make a backup of your supervisord file:

    sudo cp /etc/supervisor/conf.d/mayan-edms.conf /etc/supervisor/conf.d/mayan-edms.conf.bck
    
  7. Update the supervisord configuration file. Replace the environment variables values show here with your respective settings. This step will refresh the supervisord configuration file with the new queues and the latest recommended layout:

    sudo -u mayan MAYAN_DATABASE_ENGINE=django.db.backends.postgresql MAYAN_DATABASE_NAME=mayan \
    MAYAN_DATABASE_PASSWORD=mayandbpass MAYAN_DATABASE_USER=mayan \
    MAYAN_DATABASE_HOST=127.0.0.1 MAYAN_MEDIA_ROOT=/opt/mayan-edms/media/ \
    /opt/mayan-edms/bin/mayan-edms.py platformtemplate supervisord | sudo sh -c "cat > /etc/supervisor/conf.d/mayan-edms.conf"
    

    or:

    sudo -u mayan MAYAN_DATABASES=\"{'default':{'ENGINE':'django.db.backends.postgresql','NAME':'mayan','PASSWORD':'mayandbpass','USER':'mayan','HOST':'127.0.0.1'}}\" \
    MAYAN_MEDIA_ROOT=/opt/mayan-edms/media/ \
    /opt/mayan-edms/bin/mayan-edms.py platformtemplate supervisord | sudo sh -c "cat > /etc/supervisor/conf.d/mayan-edms.conf"
    
  8. Edit the supervisord configuration file and update any setting specific to your installation:

    sudo vi /etc/supervisor/conf.d/mayan-edms.conf
    
  9. Migrate existing database schema and static media files with:

    sudo -u mayan MAYAN_DATABASE_ENGINE=django.db.backends.postgresql MAYAN_DATABASE_NAME=mayan \
    MAYAN_DATABASE_PASSWORD=mayandbpass MAYAN_DATABASE_USER=mayan \
    MAYAN_DATABASE_HOST=127.0.0.1 MAYAN_MEDIA_ROOT=/opt/mayan-edms/media/ \
    /opt/mayan-edms/bin/mayan-edms.py performupgrade
    

    or:

     sudo -u mayan MAYAN_DATABASES="{'default':{'ENGINE':'django.db.backends.postgresql','NAME':'mayan','PASSWORD':'mayandbpass','USER':'mayan','HOST':'127.0.0.1'}}" \
     MAYAN_MEDIA_ROOT=/opt/mayan-edms/media/ \
    /opt/mayan-edms/bin/mayan-edms.py performupgrade
    
  10. Start supervisord:

    sudo systemctl start supervisor
    
  11. Clear the browser cache to avoid loading old web assets.

The upgrade procedure is now complete.

Issues closed