From af56f5f363eecc8242fbc2e3255c2192a8cb4a6a Mon Sep 17 00:00:00 2001 From: bcdasilv Date: Wed, 25 Oct 2023 11:25:27 -0700 Subject: [PATCH] Added back links to linked work items --- .../com/teamscale/polarion/plugin/model/WorkItemForJson.java | 2 +- .../src/com/teamscale/polarion/plugin/utils/CastUtils.java | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/com.teamscale.polarion.plugin/src/com/teamscale/polarion/plugin/model/WorkItemForJson.java b/com.teamscale.polarion.plugin/src/com/teamscale/polarion/plugin/model/WorkItemForJson.java index 1a52cc8..a23cea4 100644 --- a/com.teamscale.polarion.plugin/src/com/teamscale/polarion/plugin/model/WorkItemForJson.java +++ b/com.teamscale.polarion.plugin/src/com/teamscale/polarion/plugin/model/WorkItemForJson.java @@ -44,7 +44,7 @@ public class WorkItemForJson { private String author; private List categories; private String[] comments; - private List linkedWorkItems; // All links (in and out links) + private List linkedWorkItems; private List watchers; private Collection workItemChanges; diff --git a/com.teamscale.polarion.plugin/src/com/teamscale/polarion/plugin/utils/CastUtils.java b/com.teamscale.polarion.plugin/src/com/teamscale/polarion/plugin/utils/CastUtils.java index b2b192f..bedb85d 100644 --- a/com.teamscale.polarion.plugin/src/com/teamscale/polarion/plugin/utils/CastUtils.java +++ b/com.teamscale.polarion.plugin/src/com/teamscale/polarion/plugin/utils/CastUtils.java @@ -154,9 +154,12 @@ public static WorkItemForJson castWorkItem( List directLinksStruct = (List) workItem.getLinkedWorkItemsStructsDirect(); + List backLinksStruct = + (List) workItem.getLinkedWorkItemsStructsBack(); + directLinksStruct.addAll(backLinksStruct); // both direct and back links List linkedItems = (List) - directLinksStruct.stream() + directLinksStruct.stream() .filter( linkStruct -> Arrays.asList(includeLinkRoles)