Webhook not firing on issue create system event but does in all others events

Marat September 15, 2017

Hi everone. Does somebody knows what means 

Transition cannot be sent to webhook as an issue has not been created yet ?

In jira's log when CreateIssueDetails or QuickCreateIssue is requested. But on other system events it does. Checkbox on create event turned on in a hook settings.

1 answer

1 accepted

1 vote
Answer accepted
Andy Heinzer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 19, 2017

The error message you posted appears to be generated by the webhooks plugin in JIRA.   I dug into the code of this plugin and found only one place where this error appears to be generated:

        if (issue == null || !issue.isCreated())
        {
            logger.error("Transition cannot be sent to webhook as an issue has not been created yet.");
            return;
        }

This indicates that only if the issue is null or has not yet been created would this error get generated. 

Since this webhook seems to be triggered on the issue created event, my concern is to learn why the webhook might be getting fired off before Jira is sure the issue exists.

Is this happening all the time?  In certain projects?

I'd be interested to see what your workflow looks like for the project where these issues are created.  Specifically, I'd want to take a close look at the create transition and see what postfunctions exists there and their order.

Your post functions for this should be specifically in the order below:

createpostfun.png

If you are missing any of these, or they are not in this specific order, it could be that Jira is triggering the webhook before the issue has been both created, and reindexed by Jira.  In either case, Jira would be unable to see that issue and provide the details on that issue into the webhook posted data.

If this doesn't help, I'd like to know more about your specific version of Jira so we can try to investigate this further.

Marat September 20, 2017

Yes. The order of Post Functions means. Put the hook firing in the last. And it works. Thanks!

Suggest an answer

Log in or Sign up to answer