From nobody Tue May 13 15:33:50 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=patchew-devel-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=patchew-devel-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1538145950971643.8993471133178; Fri, 28 Sep 2018 07:45:50 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 9ADEBCA39D; Fri, 28 Sep 2018 14:45:49 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 68466261AA; Fri, 28 Sep 2018 14:45:49 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 73BE44BB74; Fri, 28 Sep 2018 14:45:48 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w8SEjliq024555 for ; Fri, 28 Sep 2018 10:45:47 -0400 Received: by smtp.corp.redhat.com (Postfix) id 2D7212619E; Fri, 28 Sep 2018 14:45:47 +0000 (UTC) Received: from mx1.redhat.com (ext-mx04.extmail.prod.ext.phx2.redhat.com [10.5.110.28]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2379C2619C for ; Fri, 28 Sep 2018 14:45:44 +0000 (UTC) Received: from mail-wm1-f51.google.com (mail-wm1-f51.google.com [209.85.128.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 3507C88309 for ; Fri, 28 Sep 2018 14:45:43 +0000 (UTC) Received: by mail-wm1-f51.google.com with SMTP id 189-v6so2186470wmw.2 for ; Fri, 28 Sep 2018 07:45:43 -0700 (PDT) Received: from donizetti.par1.mozilla.com ([2a00:8c40:243:232:de:fba5:535e:2dc2]) by smtp.gmail.com with ESMTPSA id n68-v6sm1884636wmn.5.2018.09.28.07.45.40 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 28 Sep 2018 07:45:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:subject:date:message-id:in-reply-to:references; bh=fN3GmylKJ4AyxZEhj+K/Ecfn3DN4dTRbpMRAtbRnrFg=; b=bffW6klHifWVXBFP9StKslm+U1GCf/k+/NxErxDneRYmuv2KFaoAhB1TFBN7zW6gj9 cGkGeAHbYe/yQhyP/xbOrSz7Lj4WQTf+kbGtCFlYI/R+mc4M5i1sGFe9GesXvC+u1fM3 PdjPOcql+RDDv7GUgh3Ko1SHhcZ6Jl6Qxw/4gimvzHSmy6HZtw3Q5qmoLj0DV/jkonnl Y15/CV+tCKsWdEkhbACCvCmX2g1WQwgboVdSkY3diE0rY25PfrhI6o1jKBMRyE5oqrlB OWSzYk2NCMnFY/wwL0nZMDzbVmpmmOAD7sQQoq0O1lQ9E0yJzAlhzhggNLIH9wTItjkB g6sQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:subject:date:message-id :in-reply-to:references; bh=fN3GmylKJ4AyxZEhj+K/Ecfn3DN4dTRbpMRAtbRnrFg=; b=VeTjnL/Nb/2FRT4OuZRF8/jWJ8K7zyM8wcvrWWCJk7MEj2DPzxvAvUws07yG/nGUrV O6KGieZ4fig3mH3FtZ5s5W+szna0PI4dL731ZRSyu+aTH8oPvF/NeneM/GzeEKwAbNKr n8Pne+IZSX1AUL+7H1+GIqop6FpQakdtpZdGfCjNl+iDtPgcy0jkL4udnwspx72r+gUB 2l/8Jhkps56zElr0fu1nzcmzLjdFkJPh9fEuc4WxUgmDErDR5Lq9KeNpR4l3ONFMcfwp Qyys8YtT+j4oH/UeW09s/Xgwjw+nj9vgfFOvndoLUPjgl3GFINgq6ciYSWvibJQHQZDV eCRA== X-Gm-Message-State: ABuFfohWKWTXaaulcEVmCb1OjlGApDEBwQ9x5X3gRJW5X77IuEgtGn4g Zmfwd92otTHhS/7J2sA4vv32aR9UAjs= X-Google-Smtp-Source: ACcGV61BYfBB6wHK4eW7zMFFbRCP0dWcbOt/tkk3zLAHwvNS3ByvWAbm7IoIKaQeakYhKVSJlo6NUA== X-Received: by 2002:a1c:7711:: with SMTP id t17-v6mr2033468wmi.35.1538145941458; Fri, 28 Sep 2018 07:45:41 -0700 (PDT) From: Paolo Bonzini To: patchew-devel@redhat.com Date: Fri, 28 Sep 2018 16:45:28 +0200 Message-Id: <20180928144537.5051-2-pbonzini@redhat.com> In-Reply-To: <20180928144537.5051-1-pbonzini@redhat.com> References: <20180928144537.5051-1-pbonzini@redhat.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Fri, 28 Sep 2018 14:45:43 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Fri, 28 Sep 2018 14:45:43 +0000 (UTC) for IP:'209.85.128.51' DOMAIN:'mail-wm1-f51.google.com' HELO:'mail-wm1-f51.google.com' FROM:'paolo.bonzini@gmail.com' RCPT:'' X-RedHat-Spam-Score: 0.488 (DKIM_SIGNED, DKIM_VALID, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_PASS) 209.85.128.51 mail-wm1-f51.google.com 209.85.128.51 mail-wm1-f51.google.com X-RedHat-Possible-Forgery: Paolo Bonzini X-Scanned-By: MIMEDefang 2.78 on 10.5.110.28 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: patchew-devel@redhat.com Subject: [Patchew-devel] [PATCH v2 01/10] search: fix "is:applied" X-BeenThere: patchew-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Patchew development and discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: patchew-devel-bounces@redhat.com Errors-To: patchew-devel-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Fri, 28 Sep 2018 14:45:49 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDMRC_0 RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Convert from message properties to results. Signed-off-by: Paolo Bonzini --- api/search.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/api/search.py b/api/search.py index 63ccfaa..e330ae8 100644 --- a/api/search.py +++ b/api/search.py @@ -8,7 +8,7 @@ # This work is licensed under the MIT License. Please see the LICENSE fil= e or # http://opensource.org/licenses/MIT. =20 -from .models import Message +from .models import Message, Result from django.db.models import Q =20 class InvalidSearchTerm(Exception): @@ -70,6 +70,7 @@ Syntax: - is:complete - the series has all the patches it contains - is:merged - the series is included in the project's git tree - is:pull - the series is a pull request + - is:applied - a git tree is available for the series - has:replies - the series received a reply (apart from patches sent by t= he submitter) =20 Example: @@ -170,10 +171,8 @@ Search text keyword in the email message. Example: ~Q(properties__name=3D"obsoleted-by", properties__value__iexact=3D'') elif cond =3D=3D "applied": - q =3D Q(properties__name=3D"git.tag", - properties__value__isnull=3DFalse) & \ - ~Q(properties__name=3D"git.tag", - properties__value__iexact=3D'') + q =3D Q(results__name=3D"git", + results__status=3DResult.SUCCESS) elif cond =3D=3D "tested": q =3D Q(properties__name=3D"testing.done", properties__value=3D"true") --=20 2.17.1 _______________________________________________ Patchew-devel mailing list Patchew-devel@redhat.com https://www.redhat.com/mailman/listinfo/patchew-devel