Skip to content

Commit

Permalink
ERM-3436 When exporting a KBART file, the column date_last_issue_onli… (
Browse files Browse the repository at this point in the history
#836)

* 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 date_last_issue_online null safe in KBart.groovy

* 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

---------

Co-authored-by: EthanFreestone <[email protected]>
  • Loading branch information
CalamityC and EthanFreestone authored Dec 4, 2024
1 parent 62531da commit 2390adf
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions service/src/main/groovy/org/olf/export/KBart.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -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_last_issue_online = coverage.endDate.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 {
Expand Down

0 comments on commit 2390adf

Please sign in to comment.