summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2018-04-09 17:37:34 +1200
committerPaul Eggleton <paul.eggleton@linux.intel.com>2018-05-04 23:57:53 +1200
commitbaa3f78498a07ca38ba1f31448292901a819e3c8 (patch)
tree810be3cd25835efef564599432c54245fe96e185
parent560628c0e57197c5baa30180df43c6d8e882dbd7 (diff)
downloadopenembedded-core-contrib-baa3f78498a07ca38ba1f31448292901a819e3c8.tar.gz
openembedded-core-contrib-baa3f78498a07ca38ba1f31448292901a819e3c8.tar.bz2
openembedded-core-contrib-baa3f78498a07ca38ba1f31448292901a819e3c8.zip
rrs: improve admin for Release/Milestone objects
* Ensure the Release and Milestone names are separated by a space when listing Milesones * Include the maintenance plan name in the name shown for each Release/Milestone * Allow filtering Releases/Milestones by maintenance plan Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
-rw-r--r--rrs/admin.py3
-rw-r--r--rrs/models.py4
2 files changed, 4 insertions, 3 deletions
diff --git a/rrs/admin.py b/rrs/admin.py
index 98cd0a02c8..cb0a451ebf 100644
--- a/rrs/admin.py
+++ b/rrs/admin.py
@@ -73,11 +73,12 @@ class MaintenancePlanAdmin(admin.ModelAdmin):
class ReleaseAdmin(admin.ModelAdmin):
search_fields = ['name']
+ list_filter = ['plan']
model = Release
class MilestoneAdmin(admin.ModelAdmin):
search_fields = ['name']
- list_filter = ['release__name']
+ list_filter = ['release__plan', 'release__name']
model = Milestone
class MaintainerAdmin(admin.ModelAdmin):
diff --git a/rrs/models.py b/rrs/models.py
index 5f70258045..f2a65dd8bf 100644
--- a/rrs/models.py
+++ b/rrs/models.py
@@ -81,7 +81,7 @@ class Release(models.Model):
return None
def __str__(self):
- return '%s' % (self.name)
+ return '%s - %s' % (self.plan.name, self.name)
class Milestone(models.Model):
release = models.ForeignKey(Release)
@@ -183,7 +183,7 @@ class Milestone(models.Model):
return weeks
def __str__(self):
- return '%s%s' % (self.release.name, self.name)
+ return '%s: %s %s' % (self.release.plan.name, self.release.name, self.name)
class Maintainer(models.Model):
name = models.CharField(max_length=255, unique=True)