Skip to content

Commit

Permalink
Bugfix for filter that did not actually apply to issues
Browse files Browse the repository at this point in the history
  • Loading branch information
avarsava committed Oct 3, 2024
1 parent abe6d9d commit fe54d67
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ public ActionState perform(
// This unfortunately still matches on supersets, so if you have 'My Ticket' it won't match
// 'Ny Ticket'
// but it will match 'My Ticket 2'. We address that later.
final var issues =
var issues =
current.search(
String.format(
"summary ~ \"%s\" and project = %s and issuetype = %s",
Expand All @@ -157,11 +157,11 @@ public ActionState perform(
Issue.UPDATED.name(),
Issue.SUMMARY.name()));
// Filter again by summary title for exact matching
this.issues =
issues =
issues.stream()
.filter(i -> i.getFields().get(Issue.SUMMARY.name()).asText().equals(summary))
.map(Issue::getKey)
.collect(Collectors.toSet());
.toList();
this.issues = issues.stream().map(Issue::getKey).collect(Collectors.toSet());
((Definer<JiraConnection>) connection)
.log(
new StringBuilder("Got ").append(issues.isEmpty() ? "nothing" : issues).toString(),
Expand Down

0 comments on commit fe54d67

Please sign in to comment.