Skip to content

Commit

Permalink
Remove remove_using_history from defectenhancementtask scripts (#777)
Browse files Browse the repository at this point in the history
The filtering was moved to the Bugzilla query.

Fixes #775
  • Loading branch information
Lothiraldan authored and marco-c committed Jul 19, 2019
1 parent 24ef18d commit 74e96ef
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions auto_nag/scripts/defectenhancementtask.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,20 +63,11 @@ def get_bz_params(self, date):
"f2": "reporter",
"o2": "nowords",
"v2": reporter_skiplist,
"f3": "bug_type",
"o3": "everchanged",
"n3": "1",
}

# Remove bugs for which the type was already changed.
def remove_using_history(self, bugs):
def should_remove(bug):
for h in bug["history"]:
for change in h["changes"]:
if change["field_name"] == "type":
return True

return False

return [bug for bug in bugs if not should_remove(bug)]

def get_bugs(self, date="today", bug_ids=[]):
# Retrieve bugs to analyze.
bugs = super().get_bugs("defectenhancementtask", date=date, bug_ids=bug_ids)
Expand Down

0 comments on commit 74e96ef

Please sign in to comment.