my-issues: Fix 'commented by me' filter bug
@226d709101e9dbad1027293497028ef8b52e6435
--- app/models/support/SearchCondition.java
+++ app/models/support/SearchCondition.java
... | ... | @@ -323,13 +323,15 @@ |
323 | 323 |
private List<Long> getCommentedIssueIds(User commenter, Project project) { |
324 | 324 |
Set<Long> issueIds = new HashSet<>(); |
325 | 325 |
|
326 |
- for (Comment comment : IssueComment.find.where() |
|
326 |
+ List<IssueComment> comments = IssueComment.find.where() |
|
327 | 327 |
.eq("authorId", commenter.id) |
328 |
- .findList()) { |
|
329 |
- if (project == null) { |
|
328 |
+ .findList(); |
|
329 |
+ if (project == null) { |
|
330 |
+ for (Comment comment : comments) { |
|
330 | 331 |
issueIds.add(comment.getParent().id); |
331 |
- break; |
|
332 |
- } else { |
|
332 |
+ } |
|
333 |
+ } else{ |
|
334 |
+ for (Comment comment : comments) { |
|
333 | 335 |
if (comment.projectId.equals(project.id)) { |
334 | 336 |
issueIds.add(comment.getParent().id); |
335 | 337 |
} |
Add a comment
Delete comment
Once you delete this comment, you won't be able to recover it. Are you sure you want to delete this comment?