From 86177cf9101cd51ce5c8979752e99c5e62157aa7 Mon Sep 17 00:00:00 2001 From: APiankouski <109206864+APiankouski@users.noreply.github.com> Date: Thu, 9 Nov 2023 13:06:50 +0300 Subject: [PATCH] EPMRPP-87537 || Launch number not indexing (#945) * EPMRPP-87537 || Launch number not indexing --- build.gradle | 2 +- .../epam/ta/reportportal/dao/LaunchRepositoryCustomImpl.java | 2 +- .../java/com/epam/ta/reportportal/dao/util/RecordMappers.java | 3 +++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index 9743e2d1b..c6a08b52c 100644 --- a/build.gradle +++ b/build.gradle @@ -63,7 +63,7 @@ dependencies { } else { compile 'com.github.reportportal:commons:ce2166b5' compile 'com.github.reportportal:commons-rules:5.10.0' - compile 'com.github.reportportal:commons-model:cd4791d' + compile 'com.github.reportportal:commons-model:67c5f50' } //https://nvd.nist.gov/vuln/detail/CVE-2020-10683 (dom4j 2.1.3 version dependency) AND https://nvd.nist.gov/vuln/detail/CVE-2019-14900 diff --git a/src/main/java/com/epam/ta/reportportal/dao/LaunchRepositoryCustomImpl.java b/src/main/java/com/epam/ta/reportportal/dao/LaunchRepositoryCustomImpl.java index e94d9496a..962467be0 100644 --- a/src/main/java/com/epam/ta/reportportal/dao/LaunchRepositoryCustomImpl.java +++ b/src/main/java/com/epam/ta/reportportal/dao/LaunchRepositoryCustomImpl.java @@ -366,7 +366,7 @@ public boolean hasItemsWithLogsWithLogLevel(Long launchId, @Override public List findIndexLaunchByIds(List ids) { - return dsl.select(LAUNCH.ID, LAUNCH.NAME, LAUNCH.PROJECT_ID, LAUNCH.START_TIME) + return dsl.select(LAUNCH.ID, LAUNCH.NAME, LAUNCH.PROJECT_ID, LAUNCH.START_TIME, LAUNCH.NUMBER) .from(LAUNCH) .where(LAUNCH.ID.in(ids)) .orderBy(LAUNCH.ID) diff --git a/src/main/java/com/epam/ta/reportportal/dao/util/RecordMappers.java b/src/main/java/com/epam/ta/reportportal/dao/util/RecordMappers.java index 0822a6a12..67106e201 100644 --- a/src/main/java/com/epam/ta/reportportal/dao/util/RecordMappers.java +++ b/src/main/java/com/epam/ta/reportportal/dao/util/RecordMappers.java @@ -115,6 +115,7 @@ import java.util.function.BiConsumer; import java.util.function.BiFunction; import java.util.function.Function; +import org.apache.commons.lang3.ObjectUtils; import org.apache.logging.log4j.util.Strings; import org.jooq.Field; import org.jooq.Record; @@ -351,6 +352,8 @@ public class RecordMappers { indexLaunch.setLaunchName(record.get(LAUNCH.NAME)); indexLaunch.setLaunchStartTime(record.get(LAUNCH.START_TIME).toLocalDateTime()); indexLaunch.setProjectId(record.get(LAUNCH.PROJECT_ID)); + indexLaunch.setLaunchNumber( + (record.get(LAUNCH.NUMBER) != null) ? record.get(LAUNCH.NUMBER).longValue() : null); return indexLaunch; };