diff mbox series

[layerindex-web] rrs: sum the up-to-date and not-updated counts over all layer branches

Message ID 20261115034653.77988-2-tim.orling@konsulko.com
State Under Review
Delegated to: Tim Orling
Headers show
Series [layerindex-web] rrs: sum the up-to-date and not-updated counts over all layer branches | expand

Commit Message

Tim Orling Nov. 15, 2026, 3:46 a.m. UTC
_get_milestone_statistics() assigned the "up-to-date" and "not updated"
counts of each layer branch with "= +" instead of adding them, so a plan
with more than one layer branch showed only the last one's, against a
total summed over all of them (e.g. "1% up-to-date (22)" for
meta-openembedded 6.2 instead of 73%).

Tested on a test instance's meta-openembedded 6.2 page.

[YOCTO #16514]

AI-Generated: Claude Opus 5.5
Signed-off-by: Tim Orling <tim.orling@konsulko.com>
---
 rrs/views.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/rrs/views.py b/rrs/views.py
index 0374f5a..b2520ce 100644
--- a/rrs/views.py
+++ b/rrs/views.py
@@ -300,8 +300,8 @@  def _get_milestone_statistics(milestone, maintainer_name=None):
                 Raw.get_reup_statistics(milestone.release.plan, milestone.end_date, recipe_upstream_history)
             milestone_statistics['all'] += \
                 t_updated + t_not_updated + t_cant + t_unknown
-            milestone_statistics['up_to_date'] = +t_updated
-            milestone_statistics['not_updated'] = +t_not_updated
+            milestone_statistics['up_to_date'] += t_updated
+            milestone_statistics['not_updated'] += t_not_updated
             milestone_statistics['cant_be_updated'] += t_cant
             milestone_statistics['unknown'] += t_unknown