From d736204bfc8530a76dc6d17653ee4bd82b5dffb6 Mon Sep 17 00:00:00 2001 From: rjy7 Date: Mon, 24 Jan 2011 15:01:30 +0000 Subject: [PATCH] NIHVIVO-1868 Custom query for core:organizationForPosition shows only people in current positions --- .../config/listViewConfig-organizationForPosition.xml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/productMods/config/listViewConfig-organizationForPosition.xml b/productMods/config/listViewConfig-organizationForPosition.xml index 402443d4..7c32bcff 100644 --- a/productMods/config/listViewConfig-organizationForPosition.xml +++ b/productMods/config/listViewConfig-organizationForPosition.xml @@ -24,8 +24,11 @@ } OPTIONAL { GRAPH ?g8 { ?dateTimeInterval core:end ?dateTimeEndValue } GRAPH ?g9 { ?dateTimeEndValue core:dateTime ?dateTimeEnd } + } - } + # Current positions only: end date is either null or not in the past + } FILTER ( !bound(?dateTimeEnd) || + afn:substring(str(?dateTimeEnd), 0, 4) >= afn:substring(str(afn:now()), 0, 4) ) } ORDER BY ?personName @@ -56,7 +59,9 @@ OPTIONAL { GRAPH ?g10 { ?dateTimeInterval core:end ?dateTimeEndValue } GRAPH ?g11 { ?dateTimeEndValue core:dateTime ?dateTimeEnd } } - } + # Current positions only: end date is either null or not in the past + } FILTER ( !bound(?dateTimeEnd) || + afn:substring(str(?dateTimeEnd), 0, 4) >= afn:substring(str(afn:now()), 0, 4) ) } ORDER BY ?subclass ?personName