doortts doortts 2017-02-06
my-issues: Fix 'commented by me' filter bug
@226d709101e9dbad1027293497028ef8b52e6435
app/models/support/SearchCondition.java
--- app/models/support/SearchCondition.java
+++ app/models/support/SearchCondition.java
@@ -323,13 +323,15 @@
     private List<Long> getCommentedIssueIds(User commenter, Project project) {
         Set<Long> issueIds = new HashSet<>();
 
-        for (Comment comment : IssueComment.find.where()
+        List<IssueComment> comments = IssueComment.find.where()
                 .eq("authorId", commenter.id)
-                .findList()) {
-            if (project == null) {
+                .findList();
+        if (project == null) {
+            for (Comment comment : comments) {
                 issueIds.add(comment.getParent().id);
-                break;
-            } else {
+            }
+        } else{
+            for (Comment comment : comments) {
                 if (comment.projectId.equals(project.id)) {
                     issueIds.add(comment.getParent().id);
                 }
Add a comment
List