Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ public PendingImportObject<BrAPIObservation> constructPendingObservation() {
original = observation.getValue();
}

if (!isTimestampMatched() && timestamp != null) {
if (!isTimestampMatched() && StringUtils.isNotBlank(timestamp)) {
// Update the timestamp
DateTimeFormatter formatter = DateTimeFormatter.ISO_INSTANT;
String formattedTimeStampValue = formatter.format(observationService.parseDateTime(timestamp));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -398,11 +398,8 @@ private boolean isChanged(String cellData, BrAPIObservation observation, String
if (!cellData.isBlank() && !cellData.equals(observation.getValue())){
return true;
}
// Only check timestamp if the TS:<trait> column was present in the uploaded file.
if (timestampColumnPresent) {
if (StringUtils.isBlank(newTimestamp)) {
return (observation.getObservationTimeStamp()!=null);
}
// Only check timestamp if the TS:<trait> column was present in the uploaded file and there's a valid timestamp.
if (timestampColumnPresent && !StringUtils.isBlank(newTimestamp)) {
return !observationService.parseDateTime(newTimestamp).equals(observation.getObservationTimeStamp());
}
return false;
Expand Down
Loading