79771542

Date: 2025-09-22 11:27:59
Score: 0.5
Natty:
Report link

After some futher thoughts, I came to the conclusion that the answer is actually very simple: Just remove the increment after completion of the foreach loop:

#macro(renderChildItems $item $indentLevel)
  #set($childItems = $transaction.workItems().search().query("linkedWorkItems:parent=$item.fields.id.get AND NOT status:obsolete AND type:(design_decision system_requirement)").sort("id"))
  #foreach($child in $childItems)
    <tr>
    <td style="padding-left:$indentLevel$px">
      $child.render.withTitle.withLinks.openLinksInNewWindow()
    </td>
    </tr>
    #set($indentLevelNew = $indentLevels + $indentSizeInt)
    #renderChildItems($child $indentLevelNew)
  #end
#set($indentLevelNew = $indentLevels - $indentSizeInt) ##NEW
#end
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Sebastiaan Voorderhake