-
Bug
-
Resolution: Unresolved
-
Low
-
None
-
8.3.0, 8.5.0, 8.5.1, 8.6.0, 8.5.3, 8.7.1
-
8.03
-
12
-
Severity 2 - Major
-
2
-
Summary
Webhook with JQL will fail silently if triggered by Bitbucket dvcs trigger
Steps to Reproduce
- Setup a trigger in Jira to transition an issue upon commit.
- Add a webhook with JQL configured.
- Do a commit in Bitbucket.
- Sync the repo manually in JIRA.
Expected Results
Issue transition on Bitbucket trigger and webhook are fired.
Actual Results
The issue transition correctly, but the webhook failed to be sent out with below error:
2020-02-05 11:46:02,861 DVCSConnector.EventService:thread-1 ERROR admin 589x923x1 1hmauia 0:0:0:0:0:0:0:1 /secure/admin/AddBitbucketOrganization!finish.jspa [c.a.event.internal.AsynchronousAbleEventDispatcher] There was an exception thrown trying to dispatch event [com.atlassian.jira.event.issue.IssueEvent@1e250fb3[issue=PWBT-4,comment=<null>,worklog=<null>,changelog=[GenericEntity:ChangeGroup][issue,13303][author,null][created,2020-02-05 11:46:00.718][id,20603],eventTypeId=13,sendMail=true,params={eventsource=workflow, baseurl=http://localhost:8851/j851},subtasksUpdated=false,spanningOperation=Optional.empty]] from the invoker [SingleParameterMethodListenerInvoker{method=public void com.atlassian.webhooks.plugin.WebHookEventsProcessor.onEvent(java.lang.Object), listener=com.atlassian.webhooks.plugin.WebHookEventsProcessor@4751be21}] java.lang.RuntimeException: Incorrect usage of JIRA/lucene search API. You can only create/use: ManagedIndexSearcher inside a context (request or Jira-Thread-Local). Check: JiraThreadLocalUtils for details.. Listener: com.atlassian.webhooks.plugin.WebHookEventsProcessor event: com.atlassian.jira.event.issue.IssueEvent at com.atlassian.event.internal.SingleParameterMethodListenerInvoker.invoke(SingleParameterMethodListenerInvoker.java:57) at com.atlassian.event.internal.AsynchronousAbleEventDispatcher.lambda$null$0(AsynchronousAbleEventDispatcher.java:37) at com.atlassian.event.internal.AsynchronousAbleEventDispatcher.dispatch(AsynchronousAbleEventDispatcher.java:85) at com.atlassian.event.internal.EventPublisherImpl.invokeListeners(EventPublisherImpl.java:227) at com.atlassian.event.internal.EventPublisherImpl.publish(EventPublisherImpl.java:112) at com.atlassian.jira.event.issue.DefaultIssueEventManager.publishEventIfNotificationsAreEnabled(DefaultIssueEventManager.java:180) at com.atlassian.jira.event.issue.DefaultIssueEventManager.publishEvent(DefaultIssueEventManager.java:162) at com.atlassian.jira.event.issue.DefaultIssueEventManager.publishAsRedundant(DefaultIssueEventManager.java:204) at com.atlassian.jira.event.issue.DefaultIssueEventManager.dispatchRedundantEvent(DefaultIssueEventManager.java:101) at com.atlassian.jira.workflow.function.event.FireIssueEventFunction.execute(FireIssueEventFunction.java:62) at com.opensymphony.workflow.AbstractWorkflow.executeFunction(AbstractWorkflow.java:1014) at com.opensymphony.workflow.AbstractWorkflow.transitionWorkflow(AbstractWorkflow.java:1407) at com.opensymphony.workflow.AbstractWorkflow.doAction(AbstractWorkflow.java:557) at com.atlassian.jira.workflow.OSWorkflowManager.doWorkflowActionInsideTxn(OSWorkflowManager.java:842) at com.atlassian.jira.workflow.OSWorkflowManager.doWorkflowAction(OSWorkflowManager.java:799) at com.atlassian.jira.bc.issue.DefaultIssueService.transition(DefaultIssueService.java:514) ... 3 filtered
Workaround
Currently there is no known workaround for this behavior. A workaround will be added here when available