diff --git a/src/main/java/com/epam/ta/reportportal/dao/TestItemRepository.java b/src/main/java/com/epam/ta/reportportal/dao/TestItemRepository.java index 98531e8f9..bbddd7b72 100644 --- a/src/main/java/com/epam/ta/reportportal/dao/TestItemRepository.java +++ b/src/main/java/com/epam/ta/reportportal/dao/TestItemRepository.java @@ -575,17 +575,18 @@ Optional findLatestIdByTestCaseHashAndLaunchIdAndParentId( @Query(value = """ select ti.item_id as itemId, + ti.name as name, + cast (ti.path as varchar) as path, a.file_id as fileId, a.file_name as fileName, a.content_type as contentType from attachment a - join test_item ti on ti.item_id = a.item_id + right join test_item ti on ti.item_id = a.item_id where ti.launch_id = :launchId and ti.has_stats = false and ti.path <@ CAST(:path AS LTREE) and ti.item_id != :itemId - and a.file_id is not null - order by ti.path, ti.item_id, a.id + order by ti.item_id, a.id """, nativeQuery = true ) diff --git a/src/main/java/com/epam/ta/reportportal/entity/item/NestedItemAttachment.java b/src/main/java/com/epam/ta/reportportal/entity/item/NestedItemAttachment.java index e35b159f9..ba4def5a2 100644 --- a/src/main/java/com/epam/ta/reportportal/entity/item/NestedItemAttachment.java +++ b/src/main/java/com/epam/ta/reportportal/entity/item/NestedItemAttachment.java @@ -8,6 +8,8 @@ public class NestedItemAttachment { private Long itemId; + private String name; + private String path; private String fileId; private String fileName; private String contentType;