Changes for page Per Year

From version 145.1
edited by Andrea Omicini
on 30/06/2023 17:11
Change comment: There is no comment for this version
To version 147.1
edited by Andrea Omicini
on 30/06/2023 20:32
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -88,12 +88,12 @@
88 88  ## INVARIANT: $oneCycle and $cycleList are correctly and coherently initialised
89 89  #### HANDLE PARAMETERS / END
90 90  ##
91 -## query to structures
91 +## DATA STRUCTURES / START
92 92  #set( $itemMap = {} )
93 93  #set( $itemNo = 0 )
94 94  #foreach( $year in $yearList )
95 - #set( $query = ", BaseObject as obj, StringProperty as prop0, DateProperty as prop1, StringProperty as prop2, LargeStringProperty as prop3, LargeStringProperty as prop4, LargeStringProperty as prop5
96 - where obj.name = doc.fullName and obj.className = '${objectSpace}.${objectClass}' and obj.name <> '${objectSpace}.${objectTemplate}' and prop0.id.id = obj.id and prop1.id.id = obj.id and prop2.id.id = obj.id and prop3.id.id = obj.id and prop4.id.id = obj.id and prop5.id.id = obj.id and prop0.name = 'cycle' and prop1.name = 'end' and prop2.name = 'status' and prop3.name = 'supervisors' and prop4.name = 'cosupervisors' and prop5.name = 'contacts' #if( $oneCycle ) and prop0.value = '$cycle'#end and year(prop1.value) = $year and lower(prop2.value) = 'completed' #if( $oneUser )and ( prop3.value like '%$userString%' or prop4.value like '%$userString%' or prop5.value like '%$userString%' )#end order by prop1.value desc" )
95 + #set( $query = ", BaseObject as objThesis #if( $oneCycle ), StringProperty as propCycle #end, DateProperty as propEnddate, StringProperty as propStatus, LargeStringProperty as propSupervisor, LargeStringProperty as propCosupervisor, LargeStringProperty as propContact
96 + where objThesis.name = doc.fullName and objThesis.className = '${objectSpace}.${objectClass}' and objThesis.name <> '${objectSpace}.${objectTemplate}' and propEnddate.id.id = objThesis.id and propStatus.id.id = objThesis.id and propSupervisor.id.id = objThesis.id and propCosupervisor.id.id = objThesis.id and propContact.id.id = objThesis.id and propEnddate.name = 'end' and propStatus.name = 'status' and propSupervisor.name = 'supervisors' and propCosupervisor.name = 'cosupervisors' and propContact.name = 'contacts' #if( $oneCycle ) and propCycle.id.id = objThesis.id and propCycle.name = 'cycle' and propCycle.value = '$cycle' #end and year(propEnddate.value) = $year and lower(propStatus.value) = 'completed' #if( $oneUser )and ( propSupervisor.value like '%$userString%' or propCosupervisor.value like '%$userString%' or propContact.value like '%$userString%' )#end order by propEnddate.value desc" )
97 97  ## do query
98 98   #set( $itemFound = $xwiki.searchDocuments($query) )
99 99  ## set counters