diff --git a/webapp/src/main/webapp/config/listViewConfig-researchAreaOf.xml b/webapp/src/main/webapp/config/listViewConfig-researchAreaOf.xml
index b833abdf..b3a6d9b4 100644
--- a/webapp/src/main/webapp/config/listViewConfig-researchAreaOf.xml
+++ b/webapp/src/main/webapp/config/listViewConfig-researchAreaOf.xml
@@ -22,6 +22,7 @@
?org
?orgLabel
?title
+ ?dateTimeEnd
WHERE {
?subject ?property ?person .
OPTIONAL { ?person core:relatedBy ?position .
@@ -42,8 +43,13 @@
?org a foaf:Organization .
?org rdfs:label ?orgLabel
}
+ OPTIONAL { ?position core:dateTimeInterval ?dateTimeInterval .
+ ?dateTimeInterval core:end ?dateTimeEndValue .
+ ?dateTimeEndValue core:dateTime ?dateTimeEnd .
+ FILTER ( ?dateTimeEnd < now() )
+ }
}
- ORDER BY (fn:lower-case(?personName))
+ ORDER BY (fn:lower-case(?personName)) (bound(?dateTimeEnd)) desc(?dateTimeEnd)
@@ -59,6 +65,9 @@
?position core:relates ?org .
?org a foaf:Organization .
?org rdfs:label ?orgName .
+ ?position core:dateTimeInterval ?dateTimeInterval .
+ ?dateTimeInterval core:end ?endDate .
+ ?endDate core:dateTime ?endDateValue .
} WHERE {
{
?subject ?property ?person
@@ -84,6 +93,13 @@
?position core:relates ?org .
?org a foaf:Organization .
?org rdfs:label ?orgName
+ } UNION {
+ ?subject ?property ?person .
+ ?person core:relatedBy ?position .
+ ?position a core:Position .
+ ?position core:dateTimeInterval ?dateTimeInterval .
+ ?dateTimeInterval core:end ?endDate .
+ ?endDate core:dateTime ?endDateValue
}
}
diff --git a/webapp/src/main/webapp/templates/freemarker/body/partials/individual/propStatement-researchAreaOf.ftl b/webapp/src/main/webapp/templates/freemarker/body/partials/individual/propStatement-researchAreaOf.ftl
index 3059fd1b..8dc33bcc 100644
--- a/webapp/src/main/webapp/templates/freemarker/body/partials/individual/propStatement-researchAreaOf.ftl
+++ b/webapp/src/main/webapp/templates/freemarker/body/partials/individual/propStatement-researchAreaOf.ftl
@@ -14,15 +14,17 @@
<#local linkedIndividual>
${statement.personName!}
#local>
- <#if statement.title?has_content >
- <#local posnTitle = statement.title>
- <#elseif statement.posnLabel?has_content>
- <#local posnTitle = statement.posnLabel>
- #if>
- <#if statement.org??>
- <#local orgString>
- ${statement.orgLabel!""}
- #local>
+ <#if !(statement.dateTimeEnd?has_content)>
+ <#if statement.title?has_content >
+ <#local posnTitle = statement.title>
+ <#elseif statement.posnLabel?has_content>
+ <#local posnTitle = statement.posnLabel>
+ #if>
+ <#if statement.org??>
+ <#local orgString>
+ ${statement.orgLabel!""}
+ #local>
+ #if>
#if>
<@s.join [ linkedIndividual, posnTitle!, orgString! ] />