Your message dated Wed, 16 Sep 2015 15:35:45 +0200 with message-id <[email protected]> and subject line Re: Processed: tagging 797633 has caused the Debian Bug report #797633, regarding Add more context to wnpp action item short description. to be marked as done.
This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the Bug report if necessary, and/or fix the problem forthwith. (NB: If you are a system administrator and have no idea what this message is talking about, this may indicate a serious mail system misconfiguration somewhere. Please contact [email protected] immediately.) -- 797633: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=797633 Debian Bug Tracking System Contact [email protected] with problems
--- Begin Message ---Package: tracker.debian.org Severity: minor Hi, When a package has a WNPP bug filed about it, the action item displayed currently only shows the acronym. So orphaned packages, for instance, simply show: O Without more information, any user unfamiliar with the terminology would have no idea idea what it means. The attached patch would change it to: O: This package has been orphaned and needs a maintainer. Thanks, -- Andrew Starr-Bochicchio Ubuntu Developer <https://launchpad.net/~andrewsomething> Debian Developer <http://qa.debian.org/developer.php?login=asb> PGP/GPG Key ID: D53FDCB1From 94cf452350d512444c8a35f4ab6443706502b2f2 Mon Sep 17 00:00:00 2001 From: Andrew Starr-Bochicchio <[email protected]> Date: Mon, 31 Aug 2015 22:02:10 -0400 Subject: [PATCH] Add more context to wnpp action item short description. --- distro_tracker/vendor/debian/tests.py | 41 +++++++++++++++++++++++++++ distro_tracker/vendor/debian/tracker_tasks.py | 19 +++++++++++-- 2 files changed, 58 insertions(+), 2 deletions(-) diff --git a/distro_tracker/vendor/debian/tests.py b/distro_tracker/vendor/debian/tests.py index 0b563ac..52e8348 100644 --- a/distro_tracker/vendor/debian/tests.py +++ b/distro_tracker/vendor/debian/tests.py @@ -4034,6 +4034,47 @@ class UpdateWnppStatsTaskTests(TestCase): 'bug_id': bug_id, } self.assertEqual(expected_data, item.extra_data['wnpp_info']) + # Test that the short description is correctly set. + dsc = ('<a href="https://bugs.debian.org/12345">O: This package has' + ' been orphaned and needs a maintainer.</a>') + self.assertEqual(dsc, item.short_description) + + def test_action_item_created_unknown_type(self): + """ + Tests that an :class:`ActionItem + <distro_tracker.core.models.ActionItem>` instance is created when the + package has a WNPP bug of an unknown type. + """ + wnpp_type, bug_id = 'RFC', 12345 + self.set_wnpp_content([( + self.package.name, [{ + 'wnpp_type': wnpp_type, + 'bug_id': bug_id, + }] + )]) + + self.run_task() + + # An action item has been created + self.assertEqual(1, ActionItem.objects.count()) + # The item has the correct type and template + item = ActionItem.objects.all()[0] + self.assertEqual( + UpdateWnppStatsTask.ACTION_ITEM_TYPE_NAME, + item.item_type.type_name) + self.assertEqual( + UpdateWnppStatsTask.ACTION_ITEM_TEMPLATE, + item.full_description_template) + # The extra data is correctly set? + expected_data = { + 'wnpp_type': wnpp_type, + 'bug_id': bug_id, + } + self.assertEqual(expected_data, item.extra_data['wnpp_info']) + # Test that the short description is correctly set. + dsc = ('<a href="https://bugs.debian.org/12345">RFC: The WNPP database' + ' contains an entry for this package.</a>') + self.assertEqual(dsc, item.short_description) def test_action_item_updated(self): """ diff --git a/distro_tracker/vendor/debian/tracker_tasks.py b/distro_tracker/vendor/debian/tracker_tasks.py index 8390d75..fc41adf 100644 --- a/distro_tracker/vendor/debian/tracker_tasks.py +++ b/distro_tracker/vendor/debian/tracker_tasks.py @@ -1947,7 +1947,7 @@ class UpdateWnppStatsTask(BaseTask): """ ACTION_ITEM_TYPE_NAME = 'debian-wnpp-issue' ACTION_ITEM_TEMPLATE = 'debian/wnpp-action-item.html' - ITEM_DESCRIPTION = '<a href="{url}">{wnpp_type}</a>' + ITEM_DESCRIPTION = '<a href="{url}">{wnpp_type}: {wnpp_msg}</a>' def __init__(self, force_update=False, *args, **kwargs): super(UpdateWnppStatsTask, self).__init__(*args, **kwargs) @@ -2024,9 +2024,24 @@ class UpdateWnppStatsTask(BaseTask): package.main_entry.repository.codename except: release = None + + msgs = { 'O': "This package has been orphaned and needs a maintainer.", + 'ITA': "Someone intends to adopt this package.", + 'RFA': "The maintainer is looking for someone adopt this package.", + 'RFH': "The maintainer is looking for help with this package.", + 'ITP': "Someone is planning to reintroduce this package.", + 'RFP': "There is a request to reintroduced this package.", + 'RM': "This package has been requested to be removed.", + '?': "The WNPP database contains an entry for this package."} + wnpp_type = stats['wnpp_type'] + try: + wnpp_msg = msgs[wnpp_type] + except KeyError: + wnpp_msg = msgs['?'] + action_item.short_description = self.ITEM_DESCRIPTION.format( url='https://bugs.debian.org/{}'.format(stats['bug_id']), - wnpp_type=stats['wnpp_type']) + wnpp_type=wnpp_type, wnpp_msg=wnpp_msg) action_item.extra_data = { 'wnpp_info': stats, 'release': release, -- 2.1.4
--- End Message ---
--- Begin Message ---On Wed, 16 Sep 2015, Debian Bug Tracking System wrote: > > tags 797633 + patch Thanks for the patch! I did completely miss it in your initial bug report since you did not mention it at all... I have applied your patch and deployed it on tracker.debian.org. I just had to fix some stylistic issues reported by "flake8" (which runs as part of the tox-managed tests). Cheers, -- Raphaël Hertzog ◈ Debian Developer Support Debian LTS: http://www.freexian.com/services/debian-lts.html Learn to master Debian: http://debian-handbook.info/get/
--- End Message ---

