From fe54d67d1b533c89fc2e45a9dd5962e9fce33a37 Mon Sep 17 00:00:00 2001 From: Alexis Varsava Date: Thu, 3 Oct 2024 14:35:29 -0400 Subject: [PATCH] Bugfix for filter that did not actually apply to issues --- .../main/java/ca/on/oicr/gsi/shesmu/jira/IssueAction.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugin-jira/src/main/java/ca/on/oicr/gsi/shesmu/jira/IssueAction.java b/plugin-jira/src/main/java/ca/on/oicr/gsi/shesmu/jira/IssueAction.java index 17ef187e5..3e489a141 100644 --- a/plugin-jira/src/main/java/ca/on/oicr/gsi/shesmu/jira/IssueAction.java +++ b/plugin-jira/src/main/java/ca/on/oicr/gsi/shesmu/jira/IssueAction.java @@ -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", @@ -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) connection) .log( new StringBuilder("Got ").append(issues.isEmpty() ? "nothing" : issues).toString(),