def _get_blocking_bugs_for(self, bugs): # get blocker bugs in the next version for all bugs we are examining candidate_blockers = [b.depends_on for b in bugs if b.depends_on] candidate_blockers = {b for deps in candidate_blockers for b in deps} v = minor_version_tuple(self.target_releases[0]) next_version = (v[0], v[1] + 1) # retrieve blockers and filter to those with correct product and target version blocking_bugs = { bug.id: bug for bug in bzutil.get_bugs(self.bzapi, list( candidate_blockers)).values() # b.target release is a list of size 0 or 1 if any( minor_version_tuple(target) == next_version for target in bug.target_release) and bug.product == self.product } return { bug.id: [blocking_bugs[b] for b in bug.depends_on if b in blocking_bugs] for bug in bugs }
def _get_blocking_bugs_for(self, bugs): # get blocker bugs in the next version for all bugs we are examining candidate_blockers = [b.depends_on for b in bugs if b.depends_on] candidate_blockers = {b for deps in candidate_blockers for b in deps} v = minor_version_tuple(self.target_releases[0]) next_version = (v[0], v[1] + 1) pattern = re.compile(r'^[0-9]+\.[0-9]+\.(0|z)$') # retrieve blockers and filter to those with correct product and target version blocking_bugs = { bug.id: bug for bug in self.bug_tracker.get_bugs(list(candidate_blockers)) # b.target release is a list of size 0 or 1 if any( minor_version_tuple(target) == next_version for target in bug.target_release if pattern.match(target)) and bug.product == self.product } return { bug: [blocking_bugs[b] for b in bug.depends_on if b in blocking_bugs] for bug in bugs }
def same_major_release(bug): current_major_version = util.minor_version_tuple( current_target_release)[0] bug_target_major_version = util.minor_version_tuple( bug.target_release[0])[0] return bug_target_major_version == current_major_version
def _filter_tracker(bug): current_major_version = util.minor_version_tuple( current_target_release[0])[0] bug_target_major_version = util.minor_version_tuple( bug.target_release[0])[0] return bug_target_major_version == current_major_version
def same_major_release(bug): return util.minor_version_tuple( current_target_release)[0] == util.minor_version_tuple( bug.target_release[0])[0]