summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Jung <flo@windfisch.org>2013-09-03 18:28:02 +0200
committerFlorian Jung <flo@windfisch.org>2013-09-03 18:28:02 +0200
commitcbeed2d5cc5898ebbd73e116148c2173851feb59 (patch)
tree6d3c335547cee62ec91099d3837061c080e928e0
parentc737c60d34232dbe25d0c9bd65548ca69d2b40fe (diff)
Sort issues by 'most recently updated'
-rwxr-xr-xissues.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/issues.py b/issues.py
index 373b9a5..372e5af 100755
--- a/issues.py
+++ b/issues.py
@@ -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)