diff options
author | Florian Jung <flo@windfisch.org> | 2013-09-03 18:28:02 +0200 |
---|---|---|
committer | Florian Jung <flo@windfisch.org> | 2013-09-03 18:28:02 +0200 |
commit | cbeed2d5cc5898ebbd73e116148c2173851feb59 (patch) | |
tree | 6d3c335547cee62ec91099d3837061c080e928e0 | |
parent | c737c60d34232dbe25d0c9bd65548ca69d2b40fe (diff) |
Sort issues by 'most recently updated'
-rwxr-xr-x | issues.py | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -278,7 +278,21 @@ for tracker in trackers: issue_title_prefix = getIssueTitlePrefix(trackername) items.append((tracker, issue_title_prefix)) +def item_sorting_key(itemtuple): + latest = int(itemtuple[0].find('field',attrs={'name':'open_date'}).string) + + messages = itemtuple[0].findAll('message',recursive=True) + for followup in messages: + commentdate = int(followup.find('field',attrs={'name':'adddate'}).string) + if commentdate > latest: + latest = commentdate + + return latest + + print "Found", len(items), "items (" + str(skipped_count) + " skipped) in", len(trackers), "trackers." +print "Sorting items..." +items.sort(key=item_sorting_key) userVerify("Everything ok, should I really start?") github_password = getpass('%s\'s GitHub password: ' % github_user) |