Last modified by Lee Pedley on 2026/09/21 21:59

Hide last authors
Lee Pedley 1.1 1 {{velocity}}
2 #set ($settingsDoc = $xwiki.getDocument('ISMS.Settings'))
3 #set ($settings = $settingsDoc.getObject('ISMS.Code.SettingsClass'))
4 #set ($riskLowMax = 4)
5 #set ($riskMediumMax = 9)
6 #set ($riskHighMax = 14)
7 #set ($riskAppetite = 15)
8 #set ($reviewHorizon = 30)
9 #set ($evidenceHorizon = 30)
10 #set ($documentHorizon = 30)
11 #if ($settings)
12 #if ($settings.getProperty('riskLowMax').getValue()) #set ($riskLowMax = $settings.getProperty('riskLowMax').getValue()) #end
13 #if ($settings.getProperty('riskMediumMax').getValue()) #set ($riskMediumMax = $settings.getProperty('riskMediumMax').getValue()) #end
14 #if ($settings.getProperty('riskHighMax').getValue()) #set ($riskHighMax = $settings.getProperty('riskHighMax').getValue()) #end
15 #if ($settings.getProperty('riskAppetiteThreshold').getValue()) #set ($riskAppetite = $settings.getProperty('riskAppetiteThreshold').getValue()) #end
16 #if ($settings.getProperty('reviewHorizonDays').getValue()) #set ($reviewHorizon = $settings.getProperty('reviewHorizonDays').getValue()) #end
17 #if ($settings.getProperty('evidenceHorizonDays').getValue()) #set ($evidenceHorizon = $settings.getProperty('evidenceHorizonDays').getValue()) #end
18 #if ($settings.getProperty('documentHorizonDays').getValue()) #set ($documentHorizon = $settings.getProperty('documentHorizonDays').getValue()) #end
19 #end
20 #set ($docs=$services.query.xwql("from doc.object('Controls and SoA.Code.Controls and SoAClass') as obj").setLimit(2000).execute())
21 #set ($applicable=0)#set($notApplicable=0)#set($implemented=0)#set($due=0)
22 #foreach($ref in $docs)#set($d=$xwiki.getDocument($ref))#set($o=$d.getObject('Controls and SoA.Code.Controls and SoAClass'))#if($o)#if($o.getProperty('applicable').getValue()=='Yes')#set($applicable=$applicable+1)#elseif($o.getProperty('applicable').getValue()=='No')#set($notApplicable=$notApplicable+1)#end#if($o.getProperty('implementationStatus').getValue()=='Implemented')#set($implemented=$implemented+1)#end#set($rd=$o.getProperty('nextReviewDate').getValue())#if($rd && $datetool.whenIs($rd).days <= $reviewHorizon)#set($due=$due+1)#end#end#end
23 {{html wiki="true" clean="false"}}
24 <style>.report-kpis{display:flex;flex-wrap:wrap;gap:10px;margin:14px 0 20px}.report-kpi{border:1px solid #d9dfe5;border-radius:7px;padding:12px 16px;min-width:150px}.report-kpi strong{font-size:1.6em}.report-table{border-collapse:collapse;width:100%}.report-table th,.report-table td{border-bottom:1px solid #dfe4e8;padding:8px;vertical-align:top;text-align:left}@media print{.noprint{display:none!important}}</style>
25 <div class="box infomessage"><strong>Statement of Applicability report</strong><br/>This report uses your control records. It does not supply or reproduce ISO control wording; populate control references/names from sources you are licensed to use.</div>
26 <p class="noprint"><button class="btn btn-default" onclick="window.print();return false">Print / Save as PDF</button> <a class="btn btn-default" href="$xwiki.getURL('Controls and SoA.WebHome','view')">Open Controls &amp; SoA</a></p>
27 <div class="report-kpis"><div class="report-kpi"><strong>$docs.size()</strong><br/>Total controls</div><div class="report-kpi"><strong>$applicable</strong><br/>Applicable</div><div class="report-kpi"><strong>$notApplicable</strong><br/>Not applicable</div><div class="report-kpi"><strong>$implemented</strong><br/>Implemented</div><div class="report-kpi"><strong>$due</strong><br/>Due within $reviewHorizon days / overdue</div></div>
28 #if($docs.isEmpty())<div class="box infomessage">No control records exist yet.</div>#else
29 <table class="report-table"><thead><tr><th>Reference</th><th>Control</th><th>Applicable</th><th>Justification</th><th>Implementation</th><th>Owner</th><th>Evidence</th><th>Next Review</th></tr></thead><tbody>
30 #foreach($ref in $docs)#set($d=$xwiki.getDocument($ref))#set($o=$d.getObject('Controls and SoA.Code.Controls and SoAClass'))#if($o)<tr><td>$escapetool.xml($o.getProperty('controlReference').getValue())</td><td><a href="$xwiki.getURL($ref,'view')">$escapetool.xml($o.getProperty('controlName').getValue())</a></td><td>$escapetool.xml($o.getProperty('applicable').getValue())</td><td>$escapetool.xml($o.getProperty('applicabilityJustification').getValue())</td><td>$escapetool.xml($o.getProperty('implementationStatus').getValue())</td><td>$escapetool.xml($o.getProperty('owner').getValue())</td><td>$escapetool.xml($o.getProperty('relatedEvidence').getValue())</td><td>#set($rd=$o.getProperty('nextReviewDate').getValue())#if($rd)$xwiki.formatDate($rd)#end</td></tr>#end#end
31 </tbody></table>#end
32 {{/html}}
33 {{/velocity}}