[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#779406: replace gift usertag with newcomer



On Thu, 13 Aug 2015, Christophe Siraut wrote:
> Please pull 7b3d5e7.

Please attach patches for easy review and comments.

The newcomer is a first-class tag, not a usertag, so you should not only
s/gift/newcomer/ but also adjust for this difference:

> index 96ad6d7..5a00276 100644
> --- a/distro_tracker/vendor/debian/rules.py
> +++ b/distro_tracker/vendor/debian/rules.py
> @@ -385,9 +385,9 @@ def get_bug_tracker_url(package_name, package_type, category_name):
>              ('pend-exc', 'fixed'),
>              ('pend-exc', 'done'),
>          ),
> -        'gift': (
> +        'newcomer': (
>              ('users', 'debian-qa@lists.debian.org'),
> -            ('tag', 'gift'),
> +            ('tag', 'newcomer'),

Here, handle it like the "help" tag except s/help/newcomer/.

>      <li class="list-group-item">
>          <div class="list-item-key">
> -            {% if category.display_name == "gift" %}
> +            {% if category.display_name == "newcomer" %}
>              <a href="https://wiki.debian.org/qa.debian.org/GiftTag";>
>              {% endif %}
>              <b><span class="has-tooltip" data-title="{{ category.description }}" data-toggle="tooltip">{{ category.display_name }}:</span></b>
> -            {% if category.display_name == "gift" %}
> +            {% if category.display_name == "newcomer" %}
>              </a>
>              {% endif %}
>          </div>

Not your fault, but here the category link should come from the data
(category.link ?) and not be hardcoded like this.

> diff --git a/distro_tracker/vendor/debian/tracker_tasks.py b/distro_tracker/vendor/debian/tracker_tasks.py
> index 59b3878..4a078b1 100644
> --- a/distro_tracker/vendor/debian/tracker_tasks.py
> +++ b/distro_tracker/vendor/debian/tracker_tasks.py
> @@ -470,13 +470,14 @@ class UpdatePackageBugStats(BaseTask):
>          except:
>              logger.exception("Could not get bugs tagged help")
>  
> -        # Add in gift bugs from the BTS SOAP interface
> +        # Add in newcomer bugs from the BTS SOAP interface
>          try:
> -            gift_bugs = self._get_tagged_bug_stats('gift',
> -                                                   'debian-qa@lists.debian.org')
> -            self._extend_bug_stats(bug_stats, gift_bugs, 'gift')
> +            newcomer_bugs = self._get_tagged_bug_stats(
> +                'newcomer',
> +                'debian-qa@lists.debian.org')
> +            self._extend_bug_stats(bug_stats, newcomer_bugs, 'newcomer')

Here again you should adjust by dropping the second parameter to
self._get_tagged_bug_stats()

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/


Reply to: