Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Done
-
6.7.0
-
None
-
JIRAXPORTER 2021 Sprint 6
-
Description
Description
NullPointerException generated in the log when the condition is false on post-function
Pre-conditions
N/A
How to reproduce
- Create an Xporter post-function with a Javascript condition,
- Add the following Javascript code to the condition:
var labels = '${Labels}'
var priority = '${Priority}'
!(labels.indexOf('Man') >= 0) && !(priority.indexOf('Block') >= 0)
- Add a Label "Manual" and set the Priority to "Blocker" to an issue
- And transition the issue into a status that triggers the post-function
Actual result/Attachments
If the condition evaluates as "true", normal behavior happens.
When the condition evaluates as "false", it generated NullPointerException in the logs:
2021-04-30 00:38:16,689+0200 http-nio-8081-exec-55 url: /rest/api/2/issue/OSE-127992/transitions; user: portalose-only ERROR portalose-only 37x49292x3 gt4hy 194.181.0.102,0:0:0:0:0:0:0:1 /rest/api/2/issue/OSE-127992/transitions [c.x.jiraxporter.workflow.XporterPostFunctionAction] Error performing post function java.lang.NullPointerException at com.xpandit.jiraxporter.manager.impl.XporterAuditServiceImpl.create(XporterAuditServiceImpl.java:79) at com.xpandit.jiraxporter.manager.impl.XporterAnalyticsServiceImpl.publishEventXporterPostFunction(XporterAnalyticsServiceImpl.java:1071) at com.xpandit.jiraxporter.workflow.XporterPostFunctionAction.execute(XporterPostFunctionAction.java:836) at com.opensymphony.workflow.AbstractWorkflow.executeFunction(AbstractWorkflow.java:1014)
Expected result
No errors generated in the logs.
Version
- Xporter 6.7.0