From dbf82a33fbc4ac385478e300fa7cf7c9b0fe7fb9 Mon Sep 17 00:00:00 2001 From: Pavel_Bortnik Date: Fri, 2 Aug 2024 13:25:17 +0300 Subject: [PATCH] EPMRPP-92452 || Fix empty status on get ticket value --- .../reportportal/extension/monday/command/GetIssueCommand.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/epam/reportportal/extension/monday/command/GetIssueCommand.java b/src/main/java/com/epam/reportportal/extension/monday/command/GetIssueCommand.java index 7109c36..98761c5 100644 --- a/src/main/java/com/epam/reportportal/extension/monday/command/GetIssueCommand.java +++ b/src/main/java/com/epam/reportportal/extension/monday/command/GetIssueCommand.java @@ -108,7 +108,7 @@ private Ticket convertToTicket(String url, String boardId, GetItemsQuery.Item is values -> values.stream().filter(v -> Objects.nonNull(v.onStatusValue)) .map(v -> v.onStatusValue).filter(s -> Objects.nonNull(s.id)) .filter(s -> s.id.contains("status")).findFirst()) - .ifPresent(s -> ticket.setStatus(s.text)); + .ifPresentOrElse(s -> ticket.setStatus(s.text), () -> ticket.setStatus("")); ticket.setTicketUrl( Suppliers.formattedSupplier("{}/boards/{}/pulses/{}", url, boardId, issue.id).get()); return ticket;