From 42099d9ae75c5803d9af2a4a9d291647d662112d Mon Sep 17 00:00:00 2001 From: FrantiĊĦek Zatloukal Date: Jul 24 2020 06:50:13 +0000 Subject: Expose expected time when would update hit stable Fixes: https://pagure.io/fedora-qa/packager_dashboard/issue/45 --- diff --git a/oraculum/utils/dashboard.py b/oraculum/utils/dashboard.py index 4c4af27..cb1fd8d 100644 --- a/oraculum/utils/dashboard.py +++ b/oraculum/utils/dashboard.py @@ -135,6 +135,8 @@ def process_update(update): "pretty_name": update["title"], "updateid": update["alias"], "submission_date": update["date_submitted"], + "stable_by_time": str(datetime.datetime.fromisoformat(update["date_submitted"]) + + datetime.timedelta(days=update["stable_days"])) if update["autotime"] else None, "release": release_from_nevra(update["title"]), "url": update["url"], "status": update["status"], @@ -385,6 +387,7 @@ def get_updates(packages, raw_updates): "pretty_name": update["title"], "updateid": update["alias"], "submission_date": update["date_submitted"], + "stable_by_time": (update["date_submitted"] + update["stable_days"]) if update["autotime"] else None, "release": release_from_nevra(update["title"]), "url": update["url"], "status": update["status"], @@ -491,7 +494,7 @@ def get_package_bugs(package): """ data = [] query = BUGZILLA.url_to_query("https://bugzilla.redhat.com/buglist.cgi?bug_status=NEW&bug_status=__open__&" - "classification=Fedora&product=Fedora&product=Fedora EPEL&component=%s" % urllib.parse.quote(package)) + "classification=Fedora&product=Fedora&product=Fedora EPEL&component=%s" % urllib.parse.quote(package)) query["include_fields"] = ['blocks', 'comments', 'creation_time', 'creator', 'id', 'keywords', 'last_change_time', 'severity', 'priority', 'status', 'summary', 'version', 'whiteboard'] bugs = BUGZILLA.query(query)