From: Mariano Lopez <mariano.lo...@linux.intel.com>

There was an issue where the current up to date was always
using the latest upstream version to get the percentage.
This uses the upstream version in the period displayed.

Signed-off-by: Mariano Lopez <mariano.lo...@linux.intel.com>
---
 rrs/models.py | 5 +++++
 rrs/views.py  | 4 ++--
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/rrs/models.py b/rrs/models.py
index f0d4ed3..d0e88b9 100644
--- a/rrs/models.py
+++ b/rrs/models.py
@@ -272,6 +272,11 @@ class RecipeUpstream(models.Model):
     date = models.DateTimeField(db_index=True)
 
     @staticmethod
+    def get_all_recipes(history):
+        qry = RecipeUpstream.objects.filter(history = history)
+        return qry
+
+    @staticmethod
     def get_recipes_not_updated(history):
         qry = RecipeUpstream.objects.filter(history = history, status = 'N',
                 no_update_reason = '').order_by('pn')
diff --git a/rrs/views.py b/rrs/views.py
index 4a1e9bb..dbdf9cd 100644
--- a/rrs/views.py
+++ b/rrs/views.py
@@ -42,8 +42,8 @@ def _get_milestone_statistics(milestone, 
maintainer_name=None):
     )
 
     if maintainer_name is None:
-        milestone_statistics['all'] = Recipe.objects.all().count()
-
+        milestone_statistics['all'] = \
+            RecipeUpstream.get_all_recipes(recipe_upstream_history).count()
         milestone_statistics['up_to_date'] = \
             
RecipeUpstream.get_recipes_up_to_date(recipe_upstream_history).count()
         milestone_statistics['not_updated'] = \
-- 
1.9.1

-- 
_______________________________________________
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto

Reply via email to