diff --git a/app/logbook/olog/ui/src/main/java/org/phoebus/logbook/olog/ui/write/LogEntryEditorController.java b/app/logbook/olog/ui/src/main/java/org/phoebus/logbook/olog/ui/write/LogEntryEditorController.java index 7b3e59a63a..5950e3321a 100644 --- a/app/logbook/olog/ui/src/main/java/org/phoebus/logbook/olog/ui/write/LogEntryEditorController.java +++ b/app/logbook/olog/ui/src/main/java/org/phoebus/logbook/olog/ui/write/LogEntryEditorController.java @@ -599,16 +599,25 @@ public void submit() { if (editMode.equals(EditMode.NEW_LOG_ENTRY)) { ologLog.setAttachments(attachmentsEditorController.getAttachments()); } + else{ + ologLog.setId(logEntry.getId()); + } ologLog.setProperties(logPropertiesEditorController.getProperties()); LogClient logClient = logFactory.getLogClient(new SimpleAuthenticationToken(usernameProperty.get(), passwordProperty.get())); try { - if (replyTo == null) { - logEntryResult = Optional.of(logClient.set(ologLog)); - } else { - logEntryResult = Optional.of(logClient.reply(ologLog, replyTo)); + if(editMode.equals(EditMode.NEW_LOG_ENTRY)){ + if (replyTo == null) { + logEntryResult = Optional.of(logClient.set(ologLog)); + } else { + logEntryResult = Optional.of(logClient.reply(ologLog, replyTo)); + } + } + else{ + logEntryResult = Optional.of(logClient.update(ologLog)); } + // Not dirty anymore... isDirty = false;