From patchwork Fri Nov 18 01:18:45 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Finucane X-Patchwork-Id: 696379 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3tKgC55Xlcz9syB for ; Fri, 18 Nov 2016 12:19:45 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="key not found in DNS" (0-bit key; unprotected) header.d=that.guru header.i=@that.guru header.b="RwgldGJb"; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3tKgC53cffzDvyQ for ; Fri, 18 Nov 2016 12:19:45 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=fail reason="key not found in DNS" (0-bit key; unprotected) header.d=that.guru header.i=@that.guru header.b="RwgldGJb"; dkim-atps=neutral X-Original-To: patchwork@lists.ozlabs.org Delivered-To: patchwork@lists.ozlabs.org Received: from bongo.birch.relay.mailchannels.net (bongo.birch.relay.mailchannels.net [23.83.209.21]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3tKgBs4xBQzDvxS for ; Fri, 18 Nov 2016 12:19:33 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=fail reason="key not found in DNS" (0-bit key; unprotected) header.d=that.guru header.i=@that.guru header.b="RwgldGJb"; dkim-atps=neutral X-Sender-Id: mxroute|x-authuser|stephen@that.guru Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id A961BE1E55 for ; Fri, 18 Nov 2016 01:19:30 +0000 (UTC) Received: from one.mxroute.com (ip-10-107-69-155.us-west-2.compute.internal [10.107.69.155]) by relay.mailchannels.net (Postfix) with ESMTPA id CC138E1E4B for ; Fri, 18 Nov 2016 01:19:29 +0000 (UTC) X-Sender-Id: mxroute|x-authuser|stephen@that.guru Received: from one.mxroute.com ([UNAVAILABLE]. [10.22.43.236]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.7.8); Fri, 18 Nov 2016 01:19:30 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: mxroute|x-authuser|stephen@that.guru X-MailChannels-Auth-Id: mxroute X-MC-Loop-Signature: 1479431970031:1819893867 X-MC-Ingress-Time: 1479431970031 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=that.guru; s=default; h=References:In-Reply-To:Message-Id:Date:Subject:To:From:Sender: Reply-To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=gwYiAqKNftLQDgLFV4h3joDc4U/GQ6fDKEtU0Q0YZdg=; b=RwgldGJbkSgNDlkxDGzNf7k+QK VMbBymKwzvLVxeZkB3/DtgYQ7jsKaAylf1U8iJfUA7pCxoJTj99CVR04D3wuOBcRS2shlz+kwh9Zo By5cPje0yvSbNPxwu783OniOzm3IurX06VtdOgISmU2FY6T393bODZfkIgsyzIQDm3fvvSptPGNFP mgpzLmLd/cXZwPk3Mb5Ye4PI15gNH73b+KO0Z/Ks55c6lnQP3QOnFsLwnZaiWj30GuTAsGt2c/d42 2mMMTRNNKP0rCBLpT4g8a5+nkw/LjeIya1d+hRjqyNEu73k3Ck1Qi69ZvVblgFDbWG5TVULtOZsM1 FSAlf0Yw==; From: Stephen Finucane To: patchwork@lists.ozlabs.org Subject: [PATCH 3/3] ui: Add version to series name Date: Fri, 18 Nov 2016 01:18:45 +0000 Message-Id: <1479431925-24865-3-git-send-email-stephen@that.guru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1479431925-24865-1-git-send-email-stephen@that.guru> References: <1479431925-24865-1-git-send-email-stephen@that.guru> X-OutGoing-Spam-Status: No, score=-10.0 X-AuthUser: stephen@that.guru X-BeenThere: patchwork@lists.ozlabs.org X-Mailman-Version: 2.1.23 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" There's no way to distinguish between different patch versions in the UI if those patches are using cover letter or user-based names. We can't store the version as part of the name (in the database) at this has the potential to change, so the version must be populated manually. This results in some duplication for series with patch-based names but this is an acceptable compromise. Signed-off-by: Stephen Finucane --- patchwork/models.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/patchwork/models.py b/patchwork/models.py index d1d0857..05809e2 100644 --- a/patchwork/models.py +++ b/patchwork/models.py @@ -686,7 +686,8 @@ class Series(models.Model): number=number) def __str__(self): - return self.name if self.name else 'Untitled series #%d' % self.id + return ('%s (v%d)' % (self.name, self.version) if self.name + else 'Untitled series #%d' % self.id) class Meta: ordering = ('date',)