From 2f46e499377803cf26fd5172680a1c1a1b7a0587 Mon Sep 17 00:00:00 2001 From: Roberto Rosario Date: Mon, 19 Dec 2016 19:08:22 -0400 Subject: [PATCH] Sort tags by label. GitLab issue #342. Thanks to @gersilex for the find. --- HISTORY.rst | 1 + docs/releases/2.2.rst | 2 ++ mayan/apps/tags/models.py | 1 + 3 files changed, 4 insertions(+) diff --git a/HISTORY.rst b/HISTORY.rst index 7180d43ea4..634ab1f363 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -12,6 +12,7 @@ the user links - New Dashboard view - Moved licenses to their own module in every app - Update project to work with Django 1.9.11 +- Tags are alphabetically ordered by label (GitLab #342). 2.1.5 (2016-11-08) ================== diff --git a/docs/releases/2.2.rst b/docs/releases/2.2.rst index 94e7e09014..a949c4108f 100644 --- a/docs/releases/2.2.rst +++ b/docs/releases/2.2.rst @@ -22,6 +22,7 @@ the user links - Dashboard - Moved licenses to their own module in every app - Update project to work with Django 1.9.11 +- Tags are alphabetically ordered by label Removals -------- @@ -82,5 +83,6 @@ Bugs fixed or issues closed * `GitLab issue #311 `_ acl page return ContentType:Document * `GitLab issue #319 `_ TransformationResize issue with very "long" image +* `GitLab issue #342 `_ Tags should be of unordered / unsorted data type .. _PyPI: https://pypi.python.org/pypi/mayan-edms/ diff --git a/mayan/apps/tags/models.py b/mayan/apps/tags/models.py index 09dc170d98..0abb2800af 100644 --- a/mayan/apps/tags/models.py +++ b/mayan/apps/tags/models.py @@ -29,6 +29,7 @@ class Tag(models.Model): return reverse('tags:tag_tagged_item_list', args=(str(self.pk),)) class Meta: + ordering = ('label',) verbose_name = _('Tag') verbose_name_plural = _('Tags')