aboutsummaryrefslogtreecommitdiffstats
path: root/rrs/models.py
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2018-03-21 14:36:33 +1300
committerPaul Eggleton <paul.eggleton@linux.intel.com>2018-05-04 23:57:53 +1200
commit173317058391a9bbbd7bd9be63ff01cdc532807f (patch)
tree1f73455e4034dce078902f1b191b7a727715b9ea /rrs/models.py
parent9b7eec7ec803d05e376595eb25d9dc2059da5a54 (diff)
downloadopenembedded-core-contrib-173317058391a9bbbd7bd9be63ff01cdc532807f.tar.gz
rrs: add maintenance plan selection
Add a drop-down for selecting the maintenance plan from the recipes page. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Diffstat (limited to 'rrs/models.py')
-rw-r--r--rrs/models.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/rrs/models.py b/rrs/models.py
index c7d8ea01e5..fcf0876e18 100644
--- a/rrs/models.py
+++ b/rrs/models.py
@@ -27,6 +27,9 @@ class MaintenancePlan(models.Model):
email_to = models.CharField(max_length=255, blank=True, help_text='Recipient for automated emails (separate multiple addresses with ;)')
admin = models.ForeignKey(User, blank=True, null=True, help_text='Plan administrator')
+ def get_default_release(self):
+ return self.release_set.last()
+
def __str__(self):
return '%s' % (self.name)
@@ -43,6 +46,9 @@ class Release(models.Model):
start_date = models.DateField(db_index=True)
end_date = models.DateField(db_index=True)
+ def get_default_milestone(self):
+ return self.milestone_set.last()
+
@staticmethod
def get_by_date(maintplan, date):
release_qry = Release.objects.filter(plan=maintplan,