From b6c53801784d158c352d1a88ac0732ae048a377c Mon Sep 17 00:00:00 2001 From: Ryan Slominski Date: Tue, 23 Jun 2026 14:26:19 -0400 Subject: [PATCH 1/2] Allow ops review w/open event Fixes #83 --- .../org/jlab/dtm/business/session/EventFacade.java | 10 ---------- .../org/jlab/dtm/business/session/IncidentFacade.java | 6 ------ 2 files changed, 16 deletions(-) diff --git a/src/main/java/org/jlab/dtm/business/session/EventFacade.java b/src/main/java/org/jlab/dtm/business/session/EventFacade.java index 349b04a..6649ade 100644 --- a/src/main/java/org/jlab/dtm/business/session/EventFacade.java +++ b/src/main/java/org/jlab/dtm/business/session/EventFacade.java @@ -229,18 +229,8 @@ public void editEvent(BigInteger eventId, Date timeUp, String title, BigInteger "An event of type " + event.getEventType().getName() + " is already open"); } - // if(event.getTimeUp() != null) { // The event is being re-opened - // } validateEventTimeUp(event, new Date()); - // Clear reviewed by field of all incidents as not supposed to be able to review incidents in - // an open event - for (Incident incident : event.getIncidentList()) { - if (incident.getReviewedUsername() != null) { - incident.setReviewedUsername(null); - } - } - event.setTimeUp(timeUp); escalationService.resetEscalation(event); diff --git a/src/main/java/org/jlab/dtm/business/session/IncidentFacade.java b/src/main/java/org/jlab/dtm/business/session/IncidentFacade.java index 6cb7c64..56b9676 100644 --- a/src/main/java/org/jlab/dtm/business/session/IncidentFacade.java +++ b/src/main/java/org/jlab/dtm/business/session/IncidentFacade.java @@ -190,12 +190,6 @@ private void validateAndPopulateIncident( if (!reviewer) { throw new UserFriendlyException("You must be a reviewer to set the reviewed by field"); } - - if (!incident.getEvent().isClosed()) { - throw new UserFriendlyException( - "You cannot review an incident belonging to an open event (Reviewed By field must be empty)"); - } // NOTE: if you re-open an event we clear all reviewed by fields of sibling incidents - // automatically } if (incident.getExpertAcknowledged() == null) { From da9bd54be4464bda2da8edbf7d007d23bd747874 Mon Sep 17 00:00:00 2001 From: Ryan Slominski Date: Tue, 23 Jun 2026 14:36:08 -0400 Subject: [PATCH 2/2] jdoe --- README.md | 2 +- container/keycloak/initdb.d/03_customize.sh | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 6687c9b..9095c30 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ docker compose up http://localhost:8080/dtm ``` -**Note**: Login with demo username "tbrown" and password "password". +**Note**: Login with demo username "jdoe" and password "password". See: [Docker Compose Strategy](https://gist.github.com/slominskir/a7da801e8259f5974c978f9c3091d52c) diff --git a/container/keycloak/initdb.d/03_customize.sh b/container/keycloak/initdb.d/03_customize.sh index c1b3de1..03ed5e9 100644 --- a/container/keycloak/initdb.d/03_customize.sh +++ b/container/keycloak/initdb.d/03_customize.sh @@ -46,4 +46,8 @@ create_user KC_ROLE_NAME=${KC_RESOURCE}-user assign_role KC_ROLE_NAME=testlead +assign_role + +KC_USERNAME=jdoe +KC_ROLE_NAME=${KC_RESOURCE}-reviewer assign_role \ No newline at end of file