projects
/
be.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5d8e5bf
)
Add `mine' sorting criteria showing bugs assigned to yourself first.
author
Robert Lehmann
<mail@robertlehmann.de>
Fri, 26 Nov 2010 08:48:43 +0000
(09:48 +0100)
committer
Robert Lehmann
<mail@robertlehmann.de>
Fri, 26 Nov 2010 08:48:43 +0000
(09:48 +0100)
libbe/bug.py
patch
|
blob
|
history
diff --git
a/libbe/bug.py
b/libbe/bug.py
index 5361e4aaabc5060218cf907ae7bc33782b511d06..d0914b4e509870df49735459c9bc03748d3fdd53 100644
(file)
--- a/
libbe/bug.py
+++ b/
libbe/bug.py
@@
-799,6
+799,12
@@
cmp_extra_strings = lambda bug_1, bug_2 : cmp_attr(bug_1, bug_2, "extra_strings"
# chronological rankings (newer < older)
cmp_time = lambda bug_1, bug_2 : cmp_attr(bug_1, bug_2, "time", invert=True)
+def cmp_mine(bug_1, bug_2):
+ user_id = libbe.ui.util.user.get_user_id(bug_1.storage)
+ mine_1 = bug_1.assigned != user_id
+ mine_2 = bug_2.assigned != user_id
+ return cmp(mine_1, mine_2)
+
def cmp_comments(bug_1, bug_2):
"""
Compare two bugs' comments lists. Doesn't load any new comments,