From 0f758a1730b42d6918ee2314c1b90db09b0897c3 Mon Sep 17 00:00:00 2001 From: Claudia Malzer Date: Tue, 3 Dec 2024 14:55:31 +0100 Subject: [PATCH] ERM-3436 When exporting a KBART file, the column date_last_issue_online should not contain a NULL value in case there is no end year * make all kbartclone fields null safe --- service/src/main/groovy/org/olf/export/KBart.groovy | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/service/src/main/groovy/org/olf/export/KBart.groovy b/service/src/main/groovy/org/olf/export/KBart.groovy index 6dc98cf4..7e3848a2 100644 --- a/service/src/main/groovy/org/olf/export/KBart.groovy +++ b/service/src/main/groovy/org/olf/export/KBart.groovy @@ -349,14 +349,14 @@ public class KBart implements Serializable { //if (coverages.size() > 1 ) log.debug(resnum + ': title: '+ ti.name +' startDate: '+ coverage.startDate +" - endDate: "+ coverage.endDate ) KBart kbartclone = new KBart(); kbartclone = kbart.clone() - kbartclone.date_first_issue_online = coverage.startDate.toString() + kbartclone.date_first_issue_online = coverage.startDate.toString() ?: "" kbartclone.date_last_issue_online = coverage.endDate?.toString() ?: "" - kbartclone.num_first_issue_online = coverage.startIssue - kbartclone.num_last_issue_online = coverage.endIssue + kbartclone.num_first_issue_online = coverage.startIssue ?: "" + kbartclone.num_last_issue_online = coverage.endIssue ?: "" - kbartclone.num_first_vol_online = coverage.startVolume - kbartclone.num_last_vol_online = coverage.endVolume + kbartclone.num_first_vol_online = coverage.startVolume ?: "" + kbartclone.num_last_vol_online = coverage.endVolume ?: "" kbartList.add(kbartclone) } } else {