From 31a853b165b7f52d0d4c27aa4c2b8c86d5d00f62 Mon Sep 17 00:00:00 2001 From: Stephan Richter Date: Fri, 24 Oct 2025 10:56:30 +0200 Subject: [PATCH 1/2] added save button to wiki/add_page --- frontend/src/routes/wiki/AddPage.svelte | 1 + 1 file changed, 1 insertion(+) diff --git a/frontend/src/routes/wiki/AddPage.svelte b/frontend/src/routes/wiki/AddPage.svelte index da9c441..94158ab 100644 --- a/frontend/src/routes/wiki/AddPage.svelte +++ b/frontend/src/routes/wiki/AddPage.svelte @@ -61,5 +61,6 @@ \ No newline at end of file From d0d4175537cb42c836e3e108e290e5cb109d4fca Mon Sep 17 00:00:00 2001 From: Stephan Richter Date: Fri, 24 Oct 2025 20:22:40 +0200 Subject: [PATCH 2/2] fixed calculation of totalPrio Signed-off-by: Stephan Richter --- .../java/de/srsoftware/umbrella/core/model/Task.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/core/src/main/java/de/srsoftware/umbrella/core/model/Task.java b/core/src/main/java/de/srsoftware/umbrella/core/model/Task.java index f5a00ca..0e77071 100644 --- a/core/src/main/java/de/srsoftware/umbrella/core/model/Task.java +++ b/core/src/main/java/de/srsoftware/umbrella/core/model/Task.java @@ -246,11 +246,13 @@ public class Task implements Mappable { private int totalPrio() { if (status >= Status.COMPLETE.code()) return 0; // task is done, do no longer highlight - if (dueDate == null) return priority; - var diff = (int) (dueDate.toEpochDay()-LocalDate.now().toEpochDay()); - if (diff <= 0) return priority + 100; // due date has passed - if (diff < 100) return priority + 100 - diff; // due within the next 100 days - return Math.min(100,priority); + int total = priority; + if (dueDate != null) { + var diff = (int) (dueDate.toEpochDay()-LocalDate.now().toEpochDay()); + if (diff <= 0) total += 100; // due date has passed + if (diff < 100) total += 100 - diff; // due within the next 100 days + } + return Math.min(100,total); }