Wiki source code of Audit Readiness

Last modified by Lee Pedley on 2026/09/22 13:00

Show last authors
1 {{velocity}}
2 #set($docs=$services.query.xwql("from doc.object('Controls and SoA.Code.Controls and SoAClass') as obj").setLimit(2000).execute())
3 #set($attention=0)
4 {{html wiki="true" clean="false"}}
5 <style>.ready-table{width:100%;border-collapse:collapse}.ready-table th,.ready-table td{padding:8px;border-bottom:1px solid #dfe4e8;text-align:left;vertical-align:top}.ready-bad{font-weight:700}</style>
6 <div class="box infomessage"><strong>Audit readiness view</strong><br/>A practical assurance view of your live control records. It highlights missing ownership/evidence/review information; it is not a certification verdict.</div>
7 <p><a class="btn btn-default" href="$xwiki.getURL('ISMS.SoAReport','view')">Statement of Applicability Report</a> <a class="btn btn-default" href="$xwiki.getURL('ISMS.DataQuality','view')">Data Quality Check</a></p>
8 #if($docs.isEmpty())<div class="box warningmessage">No control records exist yet.</div>#else<table class="ready-table"><thead><tr><th>Control</th><th>Applicable</th><th>Implementation</th><th>Owner</th><th>Evidence</th><th>Next review</th><th>Readiness note</th></tr></thead><tbody>#foreach($ref in $docs)#set($d=$xwiki.getDocument($ref))#set($o=$d.getObject('Controls and SoA.Code.Controls and SoAClass'))#if($o)#set($note='Ready for review')#set($bad=false)#if($o.getProperty('applicable').getValue()=='Yes' && !$o.getProperty('owner').getValue())#set($note='Applicable control has no owner')#set($bad=true)#elseif($o.getProperty('applicable').getValue()=='Yes' && !$o.getProperty('relatedEvidence').getValue())#set($note='Applicable control has no linked evidence')#set($bad=true)#elseif($o.getProperty('applicable').getValue()=='Yes' && $o.getProperty('implementationStatus').getValue()!='Implemented')#set($note='Implementation not marked Implemented')#set($bad=true)#elseif(!$o.getProperty('nextReviewDate').getValue())#set($note='Next review date missing')#set($bad=true)#end#if($bad)#set($attention=$attention+1)#end<tr><td><a href="$xwiki.getURL($ref,'view')">$escapetool.xml($o.getProperty('controlReference').getValue()) - $escapetool.xml($o.getProperty('controlName').getValue())</a></td><td>$escapetool.xml($o.getProperty('applicable').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($dt=$o.getProperty('nextReviewDate').getValue())#if($dt)$xwiki.formatDate($dt)#else-#end</td><td#if($bad)<span class="ready-bad">$escapetool.xml($note)</span>#else$escapetool.xml($note)#end</td></tr>#end#end</tbody></table><p><strong>$attention</strong> control record(s) require attention under these configured completeness checks.</p>#end
9 {{/html}}
10 {{/velocity}}