From 87e8a16d6573d760cfb2a1388c29c1ea768fc620 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Mon, 3 Nov 2014 18:32:15 -0600 Subject: Update fixtures for new staff groups Signed-off-by: Dan McGee --- devel/fixtures/staff_groups.json | 72 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 devel/fixtures/staff_groups.json (limited to 'devel') diff --git a/devel/fixtures/staff_groups.json b/devel/fixtures/staff_groups.json new file mode 100644 index 00000000..6a0a0514 --- /dev/null +++ b/devel/fixtures/staff_groups.json @@ -0,0 +1,72 @@ +[ +{ + "fields": { + "group": [ + "Developers" + ], + "description": "This is a list of the current Arch Linux Developers. They maintain the [core] and [extra] package repositories in addition to doing any other developer duties.", + "sort_order": 1, + "member_title": "Developer", + "slug": "developers", + "name": "Developers" + }, + "model": "devel.staffgroup", + "pk": 1 +}, +{ + "fields": { + "group": [ + "Trusted Users" + ], + "description": "Here are all your friendly Arch Linux Trusted Users who are in charge of the [community] repository.", + "sort_order": 2, + "member_title": "Trusted User", + "slug": "trusted-users", + "name": "Trusted Users" + }, + "model": "devel.staffgroup", + "pk": 2 +}, +{ + "fields": { + "group": [ + "Retired Developers" + ], + "description": "Below you can find a list of ex-developers (aka project fellows). These folks helped make Arch what it is today. Thanks!", + "sort_order": 11, + "member_title": "Fellow", + "slug": "developer-fellows", + "name": "Developer Fellows" + }, + "model": "devel.staffgroup", + "pk": 3 +}, +{ + "fields": { + "group": [ + "Retired Trusted Users" + ], + "description": "Below you can find a list of ex-trusted users (aka fellows). These folks helped make Arch what it is today. Thanks!", + "sort_order": 12, + "member_title": "Fellow", + "slug": "trusted-user-fellows", + "name": "Trusted User Fellows" + }, + "model": "devel.staffgroup", + "pk": 4 +}, +{ + "fields": { + "group": [ + "Support Staff" + ], + "description": "These are the unheralded people that keep things running behind the scenes. Forum moderators, wiki admins, IRC moderators, mirror maintenance, and everything else that keeps a Linux distro running smoothly.", + "sort_order": 5, + "member_title": "Staff", + "slug": "support-staff", + "name": "Support Staff" + }, + "model": "devel.staffgroup", + "pk": 5 +} +] -- cgit v1.2.3 From 92437ffb21b42c5e2b58af496448f64e8292442b Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Tue, 2 Dec 2014 15:11:58 -0600 Subject: Filter maintainer list on developer dashboard MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Thank Johannes for this one. Only reason I didn't take his patches is for consistency with the way we were already doing this on the master keys page. Noticed-by: Johannes Löthberg Signed-off-by: Dan McGee --- devel/utils.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'devel') diff --git a/devel/utils.py b/devel/utils.py index 0cafbb59..68ae5bdc 100644 --- a/devel/utils.py +++ b/devel/utils.py @@ -5,13 +5,16 @@ from django.core.exceptions import ObjectDoesNotExist, MultipleObjectsReturned from django.db import connection from django.db.models import Count, Q +from devel.models import UserProfile from main.utils import cache_function from main.models import Package from packages.models import PackageRelation @cache_function(283) def get_annotated_maintainers(): - maintainers = User.objects.filter(is_active=True).order_by( + profile_ids = UserProfile.allowed_repos.through.objects.values('userprofile_id') + maintainers = User.objects.filter( + is_active=True, userprofile__id__in=profile_ids).order_by( 'first_name', 'last_name') # annotate the maintainers with # of maintained and flagged packages -- cgit v1.2.3 From 1a2709552704a91f9601a13c350153b3daf3a455 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Mon, 8 Dec 2014 20:28:54 -0600 Subject: Fix issue with memcache being unable to pickle new QS When we changed the query here, things got a little weird and we could no longer pickle. Signed-off-by: Dan McGee --- devel/utils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'devel') diff --git a/devel/utils.py b/devel/utils.py index 68ae5bdc..bd57def9 100644 --- a/devel/utils.py +++ b/devel/utils.py @@ -45,7 +45,8 @@ SELECT pr.user_id, COUNT(*), COUNT(p.flag_date) m.flagged_count = flag_count.get(m.id, 0) m.updated_count = update_count.get(m.id, 0) - return maintainers + # force non-QS context, otherwise pickling doesn't work + return list(maintainers) def ignore_does_not_exist(func): -- cgit v1.2.3