Commit 8817de6e authored by Raphaël Hertzog's avatar Raphaël Hertzog

Merge branch 'bugs-fix-counting-patch-twice' into 'master'

debian: fix bug total counting bugs with patches twice

See merge request !52
parents cebd069e 9a81e52e
Pipeline #21761 passed with stage
in 33 minutes and 48 seconds
......@@ -330,7 +330,7 @@ class DebianBugDisplayManager(BugDisplayManager):
def get_bugs_categories_list(self, stats, package):
# Some bug categories should not be included in the count.
exclude_from_count = ('help', 'newcomer')
exclude_from_count = ('patch', 'help', 'newcomer')
categories = []
total, total_merged = 0, 0
......
......@@ -5951,6 +5951,7 @@ class BugStatsTableFieldTests(TestCase):
{'bug_count': 3, 'merged_count': 0, 'category_name': 'rc'},
{'bug_count': 7, 'merged_count': 7, 'category_name': 'normal'},
{'bug_count': 1, 'merged_count': 1, 'category_name': 'wishlist'},
{'bug_count': 2, 'merged_count': 2, 'category_name': 'patch'},
]
PackageBugStats.objects.create(
package=self.package, stats=stats['bugs'])
......@@ -5963,7 +5964,7 @@ class BugStatsTableFieldTests(TestCase):
context = self.field.context(self.package)
self.assertTrue(context['all'])
self.assertEqual(context['all'], 11)
self.assertEqual(len(context['bugs']), 4)
self.assertEqual(len(context['bugs']), 5)
for bug in context['bugs']:
self.assertIn('bug_count', bug)
self.assertIn('category_name', bug)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment