From d339713d0b4d03347e9184b771981f9bb6a0272f Mon Sep 17 00:00:00 2001 From: KarpAlex Date: Sat, 30 Oct 2021 09:45:46 +0200 Subject: [PATCH] =?UTF-8?q?Issue=20Zust=C3=A4ndigkeiten=20bugfix:=20zust?= =?UTF-8?q?=C3=A4ndig=20=3D=20"Ja"=20if=20Zust=C3=A4ndigkeit=20defined,=20?= =?UTF-8?q?even=20if=20there=20are=20other=20Zust=C3=A4ndigkeiten=20define?= =?UTF-8?q?d?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/views/system/issues/issuesData.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/application/views/system/issues/issuesData.php b/application/views/system/issues/issuesData.php index 57dcae9f5..c9a1d3828 100644 --- a/application/views/system/issues/issuesData.php +++ b/application/views/system/issues/issuesData.php @@ -40,13 +40,19 @@ $query .= "SELECT issue_id, fehlercode AS \"Fehlercode\", iss.fehlercode_extern pers.vorname AS \"Vorname\", pers.nachname AS \"Nachname\", CASE WHEN + EXISTS(SELECT 1 + FROM zustaendigkeiten + WHERE fehlercode = iss.fehlercode + AND zustaendig = TRUE) /* If Zuständigkeit is defined for the oe/person, zustaendig. */ + THEN 'Ja' + WHEN EXISTS(SELECT 1 FROM zustaendigkeiten WHERE fehlercode = iss.fehlercode AND zustaendig = FALSE) /* If Zuständigkeit is defined for different oe/person, not zustaendig. */ THEN 'Nein' - ELSE 'Ja' /* If no Zuständigkeit defined or defined for oe/person of user, zustaendig. */ - END AS \"Hauptzuständig\" + ELSE 'Ja' /* If no Zuständigkeit defined, zustaendig by default. */ + END AS \"Hauptzuständig\" FROM system.tbl_issue iss JOIN system.tbl_fehler fr USING (fehlercode) JOIN system.tbl_fehlertyp ftyp USING (fehlertyp_kurzbz)