def handle_bug(self, bug, data): creator = bug['creator'] if self.people.is_mozilla(creator): return None for flag in utils.get_needinfo(bug): if flag.get('requestee', '') == creator: bugid = str(bug['id']) nick = bug['creator_detail']['nick'] data[bugid] = {'creator_nick': nick} return bug return None
def handle_bug(self, bug, data): creator = bug["creator"] if self.people.is_mozilla(creator): return None for flag in utils.get_needinfo(bug): if flag.get("requestee", "") == creator: bugid = str(bug["id"]) nick = bug["creator_detail"]["nick"] data[bugid] = {"creator_nick": nick} return bug return None
def set_people_to_nag(self, bug, buginfo): priority = self.get_priority(bug) if not self.filter_bug(priority): return None has_manager = False for flag in utils.get_needinfo(bug, days=1): requestee = flag.get('requestee', '') if requestee: if self.add(requestee, buginfo, priority=priority): has_manager = True if not has_manager: self.add_no_manager(buginfo['id']) return bug
def bughandler(self, bug, data): """bug handler for the Bugzilla query""" if bug["id"] in self.cache: return if self.handle_bug(bug, data) is None: return bugid = str(bug["id"]) res = {"id": bugid} auto_ni = self.get_mail_to_auto_ni(bug) self.add_auto_ni(bugid, auto_ni) res["summary"] = self.get_summary(bug) if self.has_assignee(): real = bug["assigned_to_detail"]["real_name"] if utils.is_no_assignee(bug["assigned_to"]): real = "nobody" if real.strip() == "": real = bug["assigned_to_detail"]["name"] if real.strip() == "": real = bug["assigned_to_detail"]["email"] res["assignee"] = real if self.has_needinfo(): s = set() for flag in utils.get_needinfo(bug): s.add(flag["requestee"]) res["needinfos"] = sorted(s) if self.has_product_component(): for k in ["product", "component"]: res[k] = bug[k] if isinstance(self, Nag): bug = self.set_people_to_nag(bug, res) if not bug: return if bugid in data: data[bugid].update(res) else: data[bugid] = res
def bughandler(self, bug, data): """bug handler for the Bugzilla query""" if bug['id'] in self.cache: return if self.handle_bug(bug, data) is None: return bugid = str(bug['id']) res = {'id': bugid} auto_ni = self.get_mail_to_auto_ni(bug) self.add_auto_ni(bugid, auto_ni) res['summary'] = self.get_summary(bug) if self.has_assignee(): real = bug['assigned_to_detail']['real_name'] if utils.is_no_assignee(bug['assigned_to']): real = 'nobody' if real.strip() == '': real = bug['assigned_to_detail']['name'] if real.strip() == '': real = bug['assigned_to_detail']['email'] res['assignee'] = real if self.has_needinfo(): s = set() for flag in utils.get_needinfo(bug): s.add(flag['requestee']) res['needinfos'] = sorted(s) if self.has_product_component(): for k in ['product', 'component']: res[k] = bug[k] if isinstance(self, Nag): bug = self.set_people_to_nag(bug, res) if not bug: return if bugid in data: data[bugid].update(res) else: data[bugid] = res
def handle_bug(self, bug, data): creator = bug['creator'] for flag in utils.get_needinfo(bug): if flag.get('requestee', '') == creator: return bug return None
def handle_bug(self, bug, data): creator = bug["creator"] for flag in utils.get_needinfo(bug): if flag.get("requestee", "") == creator: return bug return None