On 11/17/2016 07:18 PM, Stephen Finucane wrote:
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 <[email protected]>
---
 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)

I really like the idea of the series and have been needing it. One small bike-shed: It seems like you'd want to version to be at the first of the string and not the end. I assume you tried both and this works better though?

_______________________________________________
Patchwork mailing list
[email protected]
https://lists.ozlabs.org/listinfo/patchwork

Reply via email to