Skip to main content

Common Dashboard Rendering Problems

Dashboard rendering failures in TestAuto2 typically manifest as:
  1. Blank dashboard pages — white screen with no content
  2. Partial rendering — header loads but statistics/widgets missing
  3. Velocity macro errors — error messages in place of content
  4. Missing statistics — count widgets show “0” or “N/A” for all metrics
  5. Broken document inventory — tree table fails to render

Diagnostic Decision Tree

diagram

Troubleshooting Steps

1. Verify Macro Library Import

All TestAuto2 dashboards depend on the Nextedy Solutions macro library. Check that the dashboard page includes:
#import('nextedy_solutions.vm')
#nxInit()
#nxCommonStyles()
If the import line is missing or incorrect, the dashboard will fail with errors like Unknown macro: #nxSpaceBanner or Unknown macro: #nxKpiCard. Fix: Edit the wiki page in Polarion and add the import directive at the top of the Velocity template.
Velocity macro names are case-sensitive. #nxKpiCard works, #nxKPICard or #NxKpiCard will fail. Always use exact casing from the macro library.

2. Check Lucene Query Syntax

Dashboard statistics use Lucene queries to count work items. Invalid query syntax causes “0” counts or rendering failures. Common query errors:
  • Wrong work item type: type:systemRequirement (correct: type:sysReq)
  • Invalid custom field ID: severity:S3 (correct: haraSeverity.KEY:s3)
  • Missing space filter: type:desReq (should be: type:desReq AND moduleLocation.KEY:design)
Debugging:
  1. Copy the failing query from the dashboard Velocity code
  2. Open Work Items Tracker in Polarion
  3. Paste the query into the search bar
  4. Fix syntax errors until the query returns expected results
  5. Update the dashboard page with corrected query
Always test Lucene queries in the Work Items Tracker before embedding them in Velocity dashboards. This reveals syntax errors immediately without debugging Velocity code.

3. Validate Enum Field References

Dashboards that filter by ASIL, Action Priority, or severity enums must use correct enum IDs:
Dashboard FilterCorrect SyntaxWrong Syntax
ASIL D hazardsharaASIL.KEY:dharaASIL:D
High Action PriorityactionPriority.KEY:ap-highactionPriority:H
Severity S3haraSeverity.KEY:s3severity:S3
Enum fields require .KEY: accessor and lowercase enum IDs matching the enumeration configuration. Verification: Check .polarion/documents/enumerations/*.xml files for exact enum option IDs.

4. Check Project Context Variable

Dashboards use $projectId to generate links and filter queries. If this variable is undefined, links break and some widgets fail.
## Should appear near top of dashboard page:
#set($projectId = $page.space.projectId)
Symptom: Links to reports show /polarion/#/project//wiki/Documentation/... (double slash after project/). Fix: Add the #set($projectId = ...) line before any link generation or macro calls that use $projectId.

5. Debug Velocity Macro Errors

When a Velocity macro fails, Polarion displays an error message in place of the widget:
Error rendering macro 'nxLinkCoverage': 
  Method 'fields' threw exception for reference $item in template
Common macro errors:
Error MessageCauseFix
Unknown macro: #nxKpiCardMacro library not importedAdd #import('nextedy_solutions.vm')
Method 'fields' threw exceptionWork item query returned nullAdd null check: #if($item)...#end
Invalid method parametersWrong macro parameter count or typeCheck macro signature in nextedy_solutions.vm
Reference $variable not definedVariable not set before useAdd #set($variable = ...) before macro call
Debugging workflow:
  1. Identify the failing macro from the error message
  2. Open .polarion/pages/spaces/<Space>/<PageName>/page.xml in SVN
  3. Search for the macro call (e.g., #nxLinkCoverage)
  4. Verify parameter count and types against macro definition
  5. Add debug output: {/* DEBUG: $item.id = $item.id */} to check variable values
  6. Fix the macro call and commit the change

6. Verify Document Inventory Tree

The #nxDocInventoryTree macro fails if:
  • System Element work item type is missing or renamed
  • Documents exist in spaces not included in the filter
  • Module location enumeration is misconfigured
Symptom: Dashboard shows “System Element / Document” header but no rows. Fix:
## Check parameters to nxDocInventoryTree:
#nxDocInventoryTree("requirements" "System Element / Document" true)
##                   ^^^^^^^^^^^^   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  ^^^^
##                   space filter   column header                  expandable tree
Ensure the space filter matches actual document moduleLocation enum values (lowercase: requirements, design, risks, testing).

7. Check Browser JavaScript Console

Dashboard widgets may depend on client-side JavaScript for interactive features. Open browser DevTools (F12) and check the Console tab for errors:
  • TypeError: Cannot read property 'style' of null — DOM element not rendered by Velocity
  • ReferenceError: Driver is not defined — Missing JavaScript library import
  • SyntaxError: Unexpected token — Velocity generated invalid JSON or JavaScript
Fix: Correct the Velocity template to output valid HTML/JavaScript. Use #escapeJavaScript() for string values embedded in <script> blocks.

8. Validate Space Color Configuration

Space dashboards use custom accent colors defined in page-level CSS. Missing color variables cause rendering glitches:
#nxCommonStyles()
<style>
  :root { --nx-accent: #4527a0; }  /* Design space purple */
</style>
If missing, widgets render with default blue instead of space-specific color.
Use consistent colors across dashboards: Requirements (#1565c0 blue), Design (#4527a0 purple), Risks (#c62828 red), Testing (#2e7d32 green), Documentation (#616161 grey).

Verification

After fixing dashboard rendering issues, verify:
  • Dashboard page loads completely within 3-5 seconds
  • All statistic cards show correct counts (match Work Items Tracker queries)
  • Document inventory tree displays all documents organized by system element
  • Traceability coverage bars render with percentage and color (red <50%, yellow 50-79%, green ≥80%)
  • Report links navigate to correct wiki pages or Tracker views
  • No Velocity error messages visible in page content
  • Browser console shows no JavaScript errors

See Also