From 1a0011765fa2d34f7d0075f463beb9e614ec8812 Mon Sep 17 00:00:00 2001 From: Paul-Christian Volkmer Date: Tue, 10 Mar 2026 09:01:58 +0100 Subject: feat: request update audit (#258) This adds the date and username when a request gets updated. If the request gets updated by an async Kafka response, "SYSTEM" will be used as username.--- src/main/resources/db/migration/mariadb/V0_15_0_2__UpdatedAtBy.sql | 2 ++ .../resources/db/migration/postgresql/V0_15_0_2__UpdatedAtBy.sql | 2 ++ src/main/resources/templates/index.html | 5 +++++ src/main/resources/templates/report.html | 5 +++++ 4 files changed, 14 insertions(+) create mode 100644 src/main/resources/db/migration/mariadb/V0_15_0_2__UpdatedAtBy.sql create mode 100644 src/main/resources/db/migration/postgresql/V0_15_0_2__UpdatedAtBy.sql (limited to 'src/main/resources') diff --git a/src/main/resources/db/migration/mariadb/V0_15_0_2__UpdatedAtBy.sql b/src/main/resources/db/migration/mariadb/V0_15_0_2__UpdatedAtBy.sql new file mode 100644 index 0000000..2005c4f --- /dev/null +++ b/src/main/resources/db/migration/mariadb/V0_15_0_2__UpdatedAtBy.sql @@ -0,0 +1,2 @@ +ALTER TABLE request ADD COLUMN updated_at datetime; +ALTER TABLE request ADD COLUMN updated_by varchar(255); \ No newline at end of file diff --git a/src/main/resources/db/migration/postgresql/V0_15_0_2__UpdatedAtBy.sql b/src/main/resources/db/migration/postgresql/V0_15_0_2__UpdatedAtBy.sql new file mode 100644 index 0000000..ed5c807 --- /dev/null +++ b/src/main/resources/db/migration/postgresql/V0_15_0_2__UpdatedAtBy.sql @@ -0,0 +1,2 @@ +ALTER TABLE request ADD COLUMN updated_at timestamp with time zone; +ALTER TABLE request ADD COLUMN updated_by varchar(255); \ No newline at end of file diff --git a/src/main/resources/templates/index.html b/src/main/resources/templates/index.html index cea3f73..da85025 100644 --- a/src/main/resources/templates/index.html +++ b/src/main/resources/templates/index.html @@ -75,6 +75,11 @@ ([[ ${request.submissionType} ]]) +
Letzte Aktualisierung
+
+ + durch [[ ${request.updatedBy} ]] +
Patienten-Pseudonym
[[ ${request.patientPseudonym} ]] diff --git a/src/main/resources/templates/report.html b/src/main/resources/templates/report.html index 1e2d97c..cd26672 100644 --- a/src/main/resources/templates/report.html +++ b/src/main/resources/templates/report.html @@ -41,6 +41,11 @@ ([[ ${request.submissionType} ]])
+
Letzte Aktualisierung
+
+ + durch [[ ${request.updatedBy} ]] +
Patienten-Pseudonym
[[ ${request.patientPseudonym} ]] -- cgit v1.2.3