NPE with "Copy a parsed text to a field Function"
We are using the Postfunction to parse the description with a regexp and store the result in a custom field. RegExp: findReplaceAll(toString(findPattern(%{00001}, "Created via e-mail received from: ([^\]]+)"),""),"Created via e-mail received from: ","")
This writes the mail address in the description (created via incoming mail handler) to a custom field. This works in 2.2.45 and doesn't work in 2.2.46 anymore.
Creates a NullPointerException:
Unable to create issue with message.
com.atlassian.jira.exception.CreateException: com.atlassian.jira.workflow.WorkflowException
at com.atlassian.jira.issue.managers.DefaultIssueManager.createIssue(DefaultIssueManager.java:515) [classes/:?]
at com.atlassian.jira.issue.managers.DefaultIssueManager.createIssueObject(DefaultIssueManager.java:604) [classes/:?]
at com.atlassian.jira.issue.managers.RequestCachingIssueManager.createIssueObject(RequestCachingIssueManager.java:209) [classes/:?]
at com.atlassian.jira.service.util.handler.DefaultMessageHandlerContext.createIssueWithIssueManager(DefaultMessageHandlerContext.java:248) [jira-api-7.6.2.jar:?]
at com.atlassian.jira.service.util.handler.DefaultMessageHandlerContext.createIssue(DefaultMessageHandlerContext.java:166) [jira-api-7.6.2.jar:?]
at com.atlassian.jira.service.services.mail.DelegatingMessageHandlerContext.createIssue(DelegatingMessageHandlerContext.java:43) [jira-api-7.6.2.jar:?]
at com.atlassian.jira.plugins.mail.handlers.CreateIssueHandler.handleMessage(CreateIssueHandler.java:267) [?:?]
at com.atlassian.jira.plugins.mail.handlers.CreateOrCommentHandler.handleMessage(CreateOrCommentHandler.java:133) [?:?]
at com.atlassian.jira.service.services.mail.MailFetcherService.processMessage(MailFetcherService.java:415) [jira-api-7.6.2.jar:?]
at com.atlassian.jira.service.services.mail.MailFetcherService$MessageProviderImpl.getAndProcessMail(MailFetcherService.java:272) [jira-api-7.6.2.jar:?]
at com.atlassian.jira.service.services.mail.MailFetcherService.processMessages(MailFetcherService.java:404) [jira-api-7.6.2.jar:?] at com.atlassian.jira.service.services.mail.MailFetcherService.runImpl(MailFetcherService.java:396) [jira-api-7.6.2.jar:?] at com.atlassian.jira.service.services.file.AbstractMessageHandlingService.run(AbstractMessageHandlingService.java:229) [jira-api-7.6.2.jar:?] at com.atlassian.jira.service.JiraServiceContainerImpl.run(JiraServiceContainerImpl.java:68) [classes/:?] at com.atlassian.jira.service.ServiceRunner.runService(ServiceRunner.java:62) [classes/:?] at com.atlassian.jira.service.ServiceRunner.runServiceId(ServiceRunner.java:44) [classes/:?] at com.atlassian.jira.service.ServiceRunner.runJob(ServiceRunner.java:32) [classes/:?] at com.atlassian.scheduler.core.JobLauncher.runJob(JobLauncher.java:153) [atlassian-scheduler-core-1.7.0.jar:?] at com.atlassian.scheduler.core.JobLauncher.launchAndBuildResponse(JobLauncher.java:118) [atlassian-scheduler-core-1.7.0.jar:?] at com.atlassian.scheduler.core.JobLauncher.launch(JobLauncher.java:97) [atlassian-scheduler-core-1.7.0.jar:?] at com.atlassian.scheduler.caesium.impl.CaesiumSchedulerService.launchJob(CaesiumSchedulerService.java:443) [atlassian-scheduler-caesium-1.3.3.jar:?] at com.atlassian.scheduler.caesium.impl.CaesiumSchedulerService.executeClusteredJob(CaesiumSchedulerService.java:438) [atlassian-scheduler-caesium-1.3.3.jar:?] at com.atlassian.scheduler.caesium.impl.CaesiumSchedulerService.executeClusteredJobWithRecoveryGuard(CaesiumSchedulerService.java:462) [atlassian-scheduler-caesium-1.3.3.jar:?] at com.atlassian.scheduler.caesium.impl.CaesiumSchedulerService.executeQueuedJob(CaesiumSchedulerService.java:390) [atlassian-scheduler-caesium-1.3.3.jar:?] at com.atlassian.scheduler.caesium.impl.CaesiumSchedulerService$1.consume(CaesiumSchedulerService.java:285) [atlassian-scheduler-caesium-1.3.3.jar:?] at com.atlassian.scheduler.caesium.impl.CaesiumSchedulerService$1.consume(CaesiumSchedulerService.java:282) [atlassian-scheduler-caesium-1.3.3.jar:?] at com.atlassian.scheduler.caesium.impl.SchedulerQueueWorker.executeJob(SchedulerQueueWorker.java:65) [atlassian-scheduler-caesium-1.3.3.jar:?] at com.atlassian.scheduler.caesium.impl.SchedulerQueueWorker.executeNextJob(SchedulerQueueWorker.java:59) [atlassian-scheduler-caesium-1.3.3.jar:?] at com.atlassian.scheduler.caesium.impl.SchedulerQueueWorker.run(SchedulerQueueWorker.java:34) [atlassian-scheduler-caesium-1.3.3.jar:?] at java.lang.Thread.run(Thread.java:745) [?:1.8.0_111] Caused by: com.atlassian.jira.workflow.WorkflowException at com.atlassian.jira.workflow.OSWorkflowManager.createIssue(OSWorkflowManager.java:768) [classes/:?] at com.atlassian.jira.issue.managers.DefaultIssueManager.createIssue(DefaultIssueManager.java:506) [classes/:?] ... 29 more Caused by: java.lang.NullPointerException at com.fca.jira.plugins.workflowToolbox.shared.GeneralizedField.setValue(GeneralizedField.java:3901) [?:?] at com.fca.jira.plugins.workflowToolbox.shared.GeneralizedField.setValue(GeneralizedField.java:3852) [?:?] at com.fca.jira.plugins.workflowToolbox.CopyParsedTextFunction.writeParsedText(CopyParsedTextFunction.java:97) [?:?] at com.fca.jira.plugins.workflowToolbox.CopyParsedTextFunction.execute(CopyParsedTextFunction.java:74) [?:?] at com.opensymphony.workflow.AbstractWorkflow.executeFunction(AbstractWorkflow.java:1014) [osworkflow-2.9.0-atlassian-1.jar:2.9.0-atlassian-1]
Comments (10)
-
repo owner -
reporter Hi, the postfunction is the one i used for this tickets summary ;) "Copy a parsed text to a field"
-
repo owner Hi @AndiKuhn,
Can you, please, try version 2.2.47_beta_1, and let me know whether it solves your problem?
Thanks.
-
reporter Yes, this works ! Perhaps add this example to your regression tests.
When will you officially release this version ?
Thanks, Andreas
-
repo owner Thanks @AndiKuhn. I will be releasing the new version in a couple of hours.
Please, let me know, whether you are creating the issues using email or any other special procedure.
-
reporter Issues are created by Incoming Mail Handler as well as using standard 'Create' in the UI. Nothing special in the 'Create' Transition besides your postfunction.
-
repo owner Does the problem happen when the issues are created through UI, or only when created through emails?
-
reporter Hm, interesting. The error only occurs when the issue is created by mail handler. Even if i put the string "[Created via e-mail received from: Andi Kuhn mail@test.de]" into the description when creating by UI, it works as expected !
-
repo owner - changed status to resolved
The problem only happens when issues are being created anonymously, i.e., when JIRA can't identify a user as creator.
Issue has been fixed in just released version 2.2.47.
-
repo owner Issue
#947was marked as a duplicate of this issue. - Log in to comment
Hi @AndiKuhn,
Sorry for the issue. Please, tell me which post-function are you using?
Can you, please, attach a screenshot with post-function's tab? I want to see configuration of the post-function.