Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug dashboard: add a stats tab about recent resolved bugs #4

Open
markuszoeller opened this issue Apr 6, 2016 · 0 comments
Open

bug dashboard: add a stats tab about recent resolved bugs #4

markuszoeller opened this issue Apr 6, 2016 · 0 comments

Comments

@markuszoeller
Copy link
Owner

rough example of how to query the last resolved bugs.

project = launchpad.projects["nova"]

bug_tasks = project.searchTasks(status=['Invalid', 'Opinion', "Won't Fix",
                                        'Fix Released'],
                                order_by='-date_last_updated',
                                omit_duplicates=True)


print "================================================="
print " recent bug actions"
print "================================================="
today = datetime.datetime.today()
counter = 0
for bug_task in bug_tasks:
#    print(bug_task.bug)
    diff = today - bug_task.bug.date_last_updated.replace(tzinfo=None)
    if diff.days > 90:
        break
    # remove the timezone info as it disturbs the calculation of the diff
#     print("days: %d" % diff.days)
#     print "https://bugs.launchpad.net/nova/+bug/" + str(bug_task.bug.id)
    counter += 1
print(counter)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant