From 5db1d05b70ca01f2deed7b5809e239f609e1590f Mon Sep 17 00:00:00 2001 From: melanie witt Date: Thu, 18 May 2023 16:49:23 -0700 Subject: [PATCH] update_bug.py: Check project along with series Noticed recently that update_bug.py can end up updating the wrong project's task to Fix Committed on a bug affecting multiple projects because only the series is being checked. This adds an additional check to make sure the project also matches before setting the task to Fix Committed. Change-Id: I817535bd84f76780be44ad21a7e4bb4abbda0135 Depends-On: https://review.opendev.org/883664 --- jeepyb/cmd/update_bug.py | 1 + 1 file changed, 1 insertion(+) diff --git a/jeepyb/cmd/update_bug.py b/jeepyb/cmd/update_bug.py index 31fecf7..3ded116 100644 --- a/jeepyb/cmd/update_bug.py +++ b/jeepyb/cmd/update_bug.py @@ -193,6 +193,7 @@ def process_bugtask(launchpad, task, git_log, args): # Look for a related task matching the series. for reltask in bugtask.related_tasks: if (reltask.bug_target_name.endswith(series) and + reltask.bug_target_name.startswith(args.project) and reltask.status != u'Fix Released' and task.needs_change('set_fix_committed')): set_fix_committed(reltask)