Version 4.0.12

Released: July 19, 2021

Status: Stable

Changes

Documents

The ID number in document_url attribute of the DocumentFile and DocumentVersion serializers were fixed to show to correct one.

Workflows

An API endpoint that displays the list of valid transition options for a workflow instance was added.

The workflow template object content was added to the workflow instance API schema.

User interface

The JavaScript responsible of handling the active main menu link was fixed.

Other

  • Clarify purpose of common app project settings.

  • Minor API serializer cleanups.

  • Add explicit cabinet serializer read only fields.

Removals

  • None

Upgrade process

Upgrading from Mayan EDMS 3.5.x

Direct deployment

  1. Stop supervisord:

    sudo systemctl stop supervisor
    
  2. Make a backup of your supervisord file:

    sudo cp /etc/supervisor/conf.d/mayan-edms.conf /etc/supervisor/conf.d/mayan-edms.conf.bck
    
  3. Make a backup of your database:

    Use the respective backup command for the database:

  4. Upgrade to the latest pip version:

    sudo -u mayan /opt/mayan-edms/bin/pip install -U pip
    
  5. 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
    
  6. Update the Mayan EDMS Python package:

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

    the requirements will also be updated automatically.

  7. Create the user_settings/ folder inside the media folder and convert it into a Python module. This folder is used for custom setting modules. Adjust the path of the media folder for your installation:

    sudo -u mayan mkdir --parents /opt/mayan-edms/media/user_settings/
    sudo -u mayan touch /opt/mayan-edms/media/user_settings/__init__.py
    
  8. Update the Redis configuration to serve at least 3 databases:

    Replace:

    databases ...
    

    with:

    databases 3
    
  9. Edit the config file at /opt/mayan-edms/media/config.yml:

    Replace:

    LOCK_MANAGER_BACKEND: ...
    LOCK_MANAGER_BACKEND_ARGUMENTS: ...
    

    with:

    LOCK_MANAGER_BACKEND: mayan.apps.lock_manager.backends.redis_lock.RedisLock
    LOCK_MANAGER_BACKEND_ARGUMENTS: {'redis_url':'redis://:mayanredispassword@<IP address of Redis server>:6379/2'}
    
  10. Update the supervisord configuration file. Replace the environment variables values shown 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_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"
    
  11. Edit the supervisord configuration file and update any setting specific to your installation:

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

    sudo -u mayan MAYAN_MEDIA_ROOT=/opt/mayan-edms/media/ \
    /opt/mayan-edms/bin/mayan-edms.py performupgrade
    
  13. Start supervisord:

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

The upgrade procedure is now complete.

Docker Compose

Check the Docker upgrading chapter for the complete upgrade process.

Troubleshooting

If you observe the errors:

  • mayan.apps.file_caching.models.CachePartitionFile.DoesNotExist: CachePartitionFile matching query does not exist.

or:

  • FileNotFoundError: [Errno 2] No such file or directory: '/var/lib/mayan/document_file_storage/...

follow the solution outlined in the troubleshooting section: After upgrade to version 4.0

Backward incompatible changes

  • None

Issues closed

  • Forum topic #5794 Rest API v4: Bad links in some functions (version 4.0.11)

  • Forum topic #5795 Rest API v4: “transition_choices” element missing in workflow instance functions (version 4.0.11)

  • GitLab issue #1018 Scoped search returning incorrect results in some cases