I am adding a new tab to Bamboo job configuration, the tab gets displayed correctly but when I am on this tab and I click on the job, the page rendering does not happen correctly (no tabs are visible, just the page content (RobotReport)) and I see a lot of Java exceptions in the log… Moving between the tabs is smooth, no errors. When I am on the existing tabs MetaData, Logs, Artifact, Summary… and I click on the Jobs everything works correclty, only on the newly added tab the functionality is broken.
Below is the content of atlassian-plugin.xml
<xwork key="KeyXworkViewRobotReport" name="View Robot Report">
<package name="RobotPlugin" extends="buildResultView" namespace="/build/result">
<default-interceptor-ref name="defaultStack"/>
<action name="viewRobotReport" class="isode.robot.RobotReport">
<result name="success" type="freemarker">/templates/viewRobotReport.ftl</result>
<result name="error" type="freemarker">/templates/error.ftl</result>
</action>
</package>
</xwork>
<web-item key="KeyWebItemJobRobotReportTab:${planKey}-${buildNumber}" name="NameWebItemJobRobotReport" section="results.subMenu/results" weight="80">
<label key="Robot Report"/>
<link linkId="KeyWebItemJobRobotReportTab:${planKey}-${buildNumber}">/build/result/viewRobotReport.action?planKey=${planKey}&buildNumber=${buildNumber}</link>
<condition class="isode.robot.RobotReportViewCondition"/>
</web-item>
===================================================================
content of freemarker template
<html>
<head>
<title>[@ui.header pageKey='Robot Report and Logs' object='${immutableBuild.name} ${buildResultsSummary.buildNumber}' title=true /]</title>
<meta name="decorator" content="result"/>
<meta name="tab" content="NameWebItemJobRobotReport"/>
</head>
<body>
<iframe src=${HrefRobotLogPath} height="1000" width="1000"></iframe>
</body>
</html>
====================================================================
Note: If I choose the "plan"decorator, I don’t see any Java execptions but the page says
“Apologies, this page could not be properly decorated (data is missing)”
As per the link XWork plugin module
if the URL maps to /build/result/*.action , “result” decorator should be used so that the necessary decorations (Tabs, Ribbons,…) are provided.
using “result” decorator throws numerous exceptions and using “plan” decorator gives message “Apologies, this page could not be properly decorated (data is missing)”
From the bamboo code it looks like the correct decorator is getting called (result) below is the stack trace.
[INFO] [talledLocalContainer] Java method "com.atlassian.bamboo.ww2.BambooActionSupport.getWebSectionsForLocation(String)" threw an exception when invoked on isode.robot.RobotReport object "isode.robot.RobotReport@3f0a9aac"; see cause exception in the Java stack trace.
[INFO] [talledLocalContainer]
[INFO] [talledLocalContainer] ----[INFO] [talledLocalContainer] FTL stack trace ("~" means nesting-related):[INFO] [talledLocalContainer] - Failed at: #list action.getWebSectionsForLocatio... [in template "lib/menus.ftl" in macro "displayWebItems" at line 563, column 5]
[INFO] [talledLocalContainer] - Reached through: @menu.displayWebItems plan=immutableP... [in template "decorators/resultDecorator.ftl" at line 96, column 21]
[INFO] [talledLocalContainer] ----[INFO] [talledLocalContainer] [INFO] [talledLocalContainer] Java stack trace (for programmers):
**File resultDecorator.ftl**
96 [/#assign]
97 [#assign pluginItems]
98 [@menu.displayWebItems plan=immutablePlan location="jobResult.actions" /]
99 [/#assign]
**File menus.ftl**
562 [#macro displayWebItems plan location ]
563 [#list action.getWebSectionsForLocation(location) as section ] **<< This throws exception**
564 [#list action.getWebItemsForSection(location + '/' + section.key) as item]
565 [#if item.link.id?has_content]
A number of other folks are facing this issue, it was raised sometime back with no resolution, below is the link
Forum Link
Dev Help Ticket
https://ecosystem.atlassian.net/servicedesk/customer/portal/14/DEVHELP-1230