[kteam-tools PATCH] link-to-tracker: accept series in tracking bug tags

Thadeu Lima de Souza Cascardo cascardo at canonical.com
Tue Oct 31 15:57:55 UTC 2017

If the series is found in the tracking bug tags, consider it as a
candidate. This allows us to consider bugs whose nomination for the
series task has not been accepted yet.

Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo at canonical.com>
 stable/link-to-tracker | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/stable/link-to-tracker b/stable/link-to-tracker
index bb31d973..559d7541 100755
--- a/stable/link-to-tracker
+++ b/stable/link-to-tracker
@@ -172,13 +172,15 @@ class Tracking():
                 if not title.startswith(target_package + ':'):
                 tasks_by_name = s.create_tasks_by_name_mapping(bugid, s.project_tracked)
-                if '%s (Ubuntu %s)' % (target_package, target_series.title()) in tasks_by_name:
-                    found_tasks.append((bugid, tasks_by_name))
+                found_tasks.append((bugid, tasks_by_name))
             # Look through the list and see what we have -- pick out the open ones.
             found = []
             for (bugid, tasks_by_name) in found_tasks:
                 lpbug = s.launchpad.bugs[bugid]
+                if '%s (Ubuntu %s)' % (target_package, target_series.title()) not in tasks_by_name and \
+                        target_series not in lpbug.tags:
+                    continue
                 if not s.args.re_run and '<version to be filled>' not in lpbug.title:
                 if s.args.sru_cycle and s.bug_to_sru_cycle(lpbug) != s.args.sru_cycle:

More information about the kernel-team mailing list