From patchwork Wed Sep 9 12:59:14 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Finucane X-Patchwork-Id: 515834 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id AE5761400CB for ; Wed, 9 Sep 2015 22:59:47 +1000 (AEST) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 9189F1A2BCB for ; Wed, 9 Sep 2015 22:59:47 +1000 (AEST) X-Original-To: patchwork@lists.ozlabs.org Delivered-To: patchwork@lists.ozlabs.org Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by lists.ozlabs.org (Postfix) with ESMTP id 9D0F91A2B02 for ; Wed, 9 Sep 2015 22:59:23 +1000 (AEST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga101.jf.intel.com with ESMTP; 09 Sep 2015 05:59:22 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.17,496,1437462000"; d="scan'208";a="801451468" Received: from irvmail001.ir.intel.com ([163.33.26.43]) by fmsmga002.fm.intel.com with ESMTP; 09 Sep 2015 05:59:21 -0700 Received: from sivswdev01.ir.intel.com (sivswdev01.ir.intel.com [10.237.217.45]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id t89CxJVC023617; Wed, 9 Sep 2015 13:59:19 +0100 Received: from sivswdev01.ir.intel.com (localhost [127.0.0.1]) by sivswdev01.ir.intel.com with ESMTP id t89CxJeg032553; Wed, 9 Sep 2015 13:59:19 +0100 Received: (from sfinucan@localhost) by sivswdev01.ir.intel.com with id t89CxJ70032548; Wed, 9 Sep 2015 13:59:19 +0100 From: Stephen Finucane To: patchwork@lists.ozlabs.org Subject: [PATCH 7/7] Allow assigning of any user as delegate Date: Wed, 9 Sep 2015 13:59:14 +0100 Message-Id: <1441803554-31677-8-git-send-email-stephen.finucane@intel.com> X-Mailer: git-send-email 2.0.0 In-Reply-To: <1441803554-31677-1-git-send-email-stephen.finucane@intel.com> References: <1441803554-31677-1-git-send-email-stephen.finucane@intel.com> X-BeenThere: patchwork@lists.ozlabs.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Patchwork development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: patchwork-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Patchwork" Currently, Patchwork only allows to delegate patches to developers who are registered as "maintainers" of the project in Patchwork. This is a bit annoying as "maintainers" in the Patchwork sense have the power to change the state of *any* patch. It would be helpful to delegate the handling of a patch to a certain developer (who is neither the submitter of the patch nor a maintainer of the project). This request is documented here: https://lists.ozlabs.org/pipermail/patchwork/2015-July/001351.html Implement this pattern. Signed-off-by: Stephen Finucane --- patchwork/forms.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/patchwork/forms.py b/patchwork/forms.py index 0327958..a553234 100644 --- a/patchwork/forms.py +++ b/patchwork/forms.py @@ -89,10 +89,7 @@ class DeleteBundleForm(forms.Form): class DelegateField(forms.ModelChoiceField): def __init__(self, project, *args, **kwargs): - queryset = User.objects.filter(profile__in = \ - UserProfile.objects \ - .filter(maintainer_projects = project) \ - .values('pk').query) + queryset = User.objects super(DelegateField, self).__init__(queryset, *args, **kwargs)