On 22 Mar 16:13, Thomas Petazzoni wrote: > Hello, > > On Tue, 22 Mar 2016 15:09:23 +0000, Finucane, Stephen wrote: > > > Actually, I stand corrected. Doing the above would require the 'Label' > > model having a many-to-many relationship with both a 'Project' and a > > 'Patch'. There doesn't seem to be any way to enforce this at the ORM > > level, and it would require an an external library like > > 'django-smart-selects' (or duplicating that library ourselves) for > > stuff like Django Admin. It seems all labels are going to have to be > > available across the entire instance. > > Shouldn't labels simply be free form strings, with no attempt to > normalize them other than by social convention?
If we're stripping them from subject lines then yes, they'll be free form rather than slugs. > What is important to have IMO: > > 1/ An easy way to set labels on patches, both by the web-interface, > and potentially using some magic markers in the patches (custom > header? label:<value> between [...] ? something else) Agreed on first count. Still not convinced by second case, as the one use case suggested - multiple delegates - would be easy to fix by way of a migration (ForeignKey field -> ManyToMany field, as suggested in the bug tracker [1]). Maybe there are more, however? > 2/ An easy way to filter patches by label (i.e only see patches with > this label, or without that label) Yes, definitely. Shouldn't be a big deal to implement. Stephen [1] https://github.com/getpatchwork/patchwork/issues/28 _______________________________________________ Patchwork mailing list [email protected] https://lists.ozlabs.org/listinfo/patchwork
