diff --git a/HISTORY.rst b/HISTORY.rst index d0885d10fb..1cbdf7eeee 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -129,6 +129,9 @@ now get the permission inheritance from their base models. - Update common.http.URL to allow passing a query dictionary. - Add the document template sandbox feature. + +3.2.10 (2019-XX-XX) +=================== - Auto-import dependecies. No need to use: from .dependencies import * # NOQA - Add makefile target to run all tests in debug mode. @@ -139,6 +142,14 @@ and allow a list of content types to be specified. - Add missing label to metadata and file metadata model properties entries. +- Improve workflow field help text. Make it usable + for the creation/edit form help text and for the + column pop over. +- Fix NamedMultiWidget issue on Python 3. Affects + document checkout form. GitLab issue #683. Thanks + to John Bentley (@johnbentleyii) for the report. +- Add missing Event class cache invalidation when + calling the refresh() method. 3.2.9 (2019-11-03) ================== diff --git a/docs/releases/3.2.10.rst b/docs/releases/3.2.10.rst new file mode 100644 index 0000000000..40aa9f8683 --- /dev/null +++ b/docs/releases/3.2.10.rst @@ -0,0 +1,106 @@ +Version 3.2.10 +============== + +Released: November XX, 2019 + + +Changes +------- + + + + +Removals +-------- + +- None + + +Upgrading from a previous version +--------------------------------- + +If installed via Python's PIP +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +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 + +Type in the console:: + + sudo -u mayan /opt/mayan-edms/bin/pip install mayan-edms==3.2.10 + +the requirements will also be updated automatically. + + +Using Git +^^^^^^^^^ + +If you installed Mayan EDMS by cloning the Git repository issue the commands:: + + $ git reset --hard HEAD + $ git pull + +otherwise download the compressed archived and uncompress it overriding the +existing installation. + +Remove deprecated requirements:: + + $ pip uninstall -y -r removals.txt + +Next upgrade/add the new requirements:: + + $ pip install --upgrade -r requirements.txt + + +Common steps +^^^^^^^^^^^^ + +Perform these steps after updating the code from either step above. + +Make a backup of your supervisord file:: + + sudo cp /etc/supervisor/conf.d/mayan.conf /etc/supervisor/conf.d/mayan.conf.bck + +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 MAYAN_DATABASE_ENGINE=django.db.backends.postgresql MAYAN_DATABASE_NAME=mayan \ + MAYAN_DATABASE_PASSWORD=mayanuserpass 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 > /etc/supervisor/conf.d/mayan.conf + +Edit the supervisord configuration file and update any setting the template +generator missed:: + + sudo vi /etc/supervisor/conf.d/mayan.conf + +Migrate existing database schema with:: + + sudo -u mayan MAYAN_DATABASE_ENGINE=django.db.backends.postgresql MAYAN_DATABASE_NAME=mayan \ + MAYAN_DATABASE_PASSWORD=mayanuserpass 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 + +Add new static media:: + + sudo -u mayan MAYAN_MEDIA_ROOT=/opt/mayan-edms/media \ + /opt/mayan-edms/bin/mayan-edms.py preparestatic --noinput + +The upgrade procedure is now complete. + + +Backward incompatible changes +----------------------------- + +- None + + +Bugs fixed or issues closed +--------------------------- + +- :gitlab-issue:`683` Checkout Form Does not Appear in Python 3.6 + +.. _PyPI: https://pypi.python.org/pypi/mayan-edms/ diff --git a/docs/releases/index.rst b/docs/releases/index.rst index 31170c6fe0..92ae66f38f 100644 --- a/docs/releases/index.rst +++ b/docs/releases/index.rst @@ -21,6 +21,7 @@ versions of the documentation contain the release notes for any later releases. :maxdepth: 1 3.3 + 3.2.10 3.2.9 3.2.8 3.2.7 diff --git a/mayan/apps/django_gpg/tests/mixins.py b/mayan/apps/django_gpg/tests/mixins.py index 726a37eacd..edf32185af 100644 --- a/mayan/apps/django_gpg/tests/mixins.py +++ b/mayan/apps/django_gpg/tests/mixins.py @@ -38,7 +38,9 @@ class KeyTestMixin(object): class KeyViewTestMixin(object): def _request_test_key_download_view(self): return self.get( - viewname='django_gpg:key_download', kwargs={'pk': self.test_key_private.pk} + viewname='django_gpg:key_download', kwargs={ + 'pk': self.test_key_private.pk + } ) def _request_test_key_upload_view(self): diff --git a/mayan/apps/document_signatures/tests/mixins.py b/mayan/apps/document_signatures/tests/mixins.py index 5284f2011c..9bd93f2b12 100644 --- a/mayan/apps/document_signatures/tests/mixins.py +++ b/mayan/apps/document_signatures/tests/mixins.py @@ -140,7 +140,7 @@ class SignatureTestMixin(object): signature_file=File(file_object) ) - def _create_test_public_key(self): + def _create_test_key_public(self): with open(TEST_KEY_FILE_PATH, mode='rb') as file_object: self.test_key_public = Key.objects.create( key_data=file_object.read() diff --git a/mayan/apps/document_signatures/tests/test_models.py b/mayan/apps/document_signatures/tests/test_models.py index 00e4cfd298..a6c5f630be 100644 --- a/mayan/apps/document_signatures/tests/test_models.py +++ b/mayan/apps/document_signatures/tests/test_models.py @@ -47,14 +47,14 @@ class DocumentSignaturesTestCase(SignatureTestMixin, GenericDocumentTestCase): self.assertEqual(signature.key_id, TEST_KEY_PUBLIC_ID) self.assertEqual(signature.signature_id, None) - self._create_test_public_key() + self._create_test_key_public() signature = EmbeddedSignature.objects.first() self.assertEqual(signature.signature_id, TEST_SIGNATURE_ID) def test_embedded_signature_post_no_key_verify(self): - self._create_test_public_key() + self._create_test_key_public() self.test_document_path = TEST_SIGNED_DOCUMENT_PATH self.upload_document() @@ -75,7 +75,7 @@ class DocumentSignaturesTestCase(SignatureTestMixin, GenericDocumentTestCase): self.assertEqual(signature.signature_id, None) def test_embedded_signature_with_key(self): - self._create_test_public_key() + self._create_test_key_public() self.test_document_path = TEST_SIGNED_DOCUMENT_PATH self.upload_document() @@ -109,7 +109,7 @@ class DocumentSignaturesTestCase(SignatureTestMixin, GenericDocumentTestCase): self.assertEqual(self.test_signature.public_key_fingerprint, None) def test_detached_signature_with_key(self): - self._create_test_public_key() + self._create_test_key_public() self.test_document_path = TEST_DOCUMENT_PATH self.upload_document() @@ -142,7 +142,7 @@ class DocumentSignaturesTestCase(SignatureTestMixin, GenericDocumentTestCase): self.assertEqual(self.test_signature.key_id, TEST_KEY_PUBLIC_ID) self.assertEqual(self.test_signature.public_key_fingerprint, None) - self._create_test_public_key() + self._create_test_key_public() signature = DetachedSignature.objects.first() @@ -151,7 +151,7 @@ class DocumentSignaturesTestCase(SignatureTestMixin, GenericDocumentTestCase): ) def test_detached_signature_post_no_key_verify(self): - self._create_test_public_key() + self._create_test_key_public() self.test_document_path = TEST_DOCUMENT_PATH self.upload_document() diff --git a/mayan/apps/document_signatures/tests/test_views.py b/mayan/apps/document_signatures/tests/test_views.py index 2d04314c2b..3bf13518ed 100644 --- a/mayan/apps/document_signatures/tests/test_views.py +++ b/mayan/apps/document_signatures/tests/test_views.py @@ -35,7 +35,7 @@ class SignaturesViewTestCase( auto_upload_document = False def test_signature_delete_view_no_permission(self): - self._create_test_public_key() + self._create_test_key_public() self.test_document_path = TEST_DOCUMENT_PATH self.upload_document() @@ -52,7 +52,7 @@ class SignaturesViewTestCase( self.assertEqual(DetachedSignature.objects.count(), 1) def test_signature_delete_view_with_access(self): - self._create_test_public_key() + self._create_test_key_public() self.test_document_path = TEST_DOCUMENT_PATH self.upload_document() @@ -73,7 +73,8 @@ class SignaturesViewTestCase( self.assertEqual(DetachedSignature.objects.count(), 0) def test_signature_detail_view_no_permission(self): - self._create_test_public_key() + self._create_test_key_public() + self.test_document_path = TEST_DOCUMENT_PATH self.upload_document() @@ -84,7 +85,7 @@ class SignaturesViewTestCase( self.assertEqual(response.status_code, 404) def test_signature_detail_view_with_access(self): - self._create_test_public_key() + self._create_test_key_public() self.test_document_path = TEST_DOCUMENT_PATH self.upload_document() @@ -103,8 +104,7 @@ class SignaturesViewTestCase( ) def test_signature_list_view_no_permission(self): - self._create_test_public_key() - + self._create_test_key_public() self.test_document_path = TEST_DOCUMENT_PATH self.upload_document() @@ -116,7 +116,7 @@ class SignaturesViewTestCase( self.assertEqual(response.status_code, 404) def test_signature_list_view_with_access(self): - self._create_test_public_key() + self._create_test_key_public() self.test_document_path = TEST_DOCUMENT_PATH self.upload_document() diff --git a/mayan/apps/events/classes.py b/mayan/apps/events/classes.py index 66feb551b8..320f02a3a4 100644 --- a/mayan/apps/events/classes.py +++ b/mayan/apps/events/classes.py @@ -73,6 +73,9 @@ class EventType(object): @classmethod def refresh(cls): for event_type in cls.all(): + # Invalidate cache and recreate store events while repopulating + # cache + event_type.stored_event_type = None event_type.get_stored_event_type() def __init__(self, namespace, name, label):