Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Webhook url is not getting trigged and when a work flow transition is changed.

Deleted user November 8, 2018

As a jira admin, I need to edit a workflow to edit the post function . I added a post function to send transition to webhook. It is not working as expected. Kindly help me.

2 answers

0 votes
Saby July 30, 2020

hi Andy,

Having same problem ie webhook dosent work. Made changes as suggested:

1. Sent webhook post function at the very bottom.

2. No JQL is present

Could you help here please?

Many thanks in advance!

Regards

Sabyasachi

webHook - JIRA.pngTransition_ Open - JIRA.pngTransition_ Start Progress - JIRA.png

Andy Heinzer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 30, 2020

I don't see a clear problem from the screenshots you posted. Did you publish the workflow after you made these changes to the post functions?  If not, it would explain why this is not behaving as expected.  Screenshots appear to be cropped so I can't see the upper part of the page that would better indicate if this is still a draft workflow or an active workflow.

Saby July 30, 2020

Hi Andy,

Yeap, the workflow is published after the post function addition in the transition and its active, missed the upper part earlier. Adding now.

Is there any way to dig further and check if the webhook is getting called successfully? I really cant see any in JIRA UI where a webhook calls are registered.

Regards

Sabyasachi

Workflow schemes - Active.pngWorkflows - Active.png

Andy Heinzer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 30, 2020

Hi @Saby

Not sure I know the cause here, but I did run across this bug that affects Jira server versions running on top of Java 11 versions, see JRASERVER-70780.  No idea if that describes your environment or not.

If this doesn't apply, please let me know your specific version of Jira.  Perhaps there is some other explanation for why this is not working as expected.

Andy

Saby July 31, 2020

Hi @Andy Heinzer 

Am running on

1. JAVA 8

2. JIRA version Atlassian Jira Project Management Software (v8.11.0#811001-sha1:80088f0)

really not getting what could be the possible explanation here for the webhook not working. Would be great if you can help here.

Saby

 

Java-Version.png

Andy Heinzer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 3, 2020

Hi @Saby 

I can't see exactly what the URL is that Jira is trying to use for the webhook, but it looks rather long and like it might contain one or more special characters.  If so, then you should be aware of this other bug JRASERVER-71214 : Webhook calls fail if destination URL contains special characters.

That bug ticket explains that some characters such as trying to generate a token from Azure systems might tend to use an equals sign '=', this character typically has to be encoded in order to be sent in the URI.  Some users have reported trying to generate different tokens/keys until they get one without any special characters as a work-around.  But that said, aside from the alphanumeric of A-Z, a-z, and 0-9 characters, can you let me know what other characters exist in the URL you have configured within Jira to use?

Have you tried to use an example site such as https://postb.in/ in order to generate a webhook URL and then try to see if Jira can send to that correctly?  It might be a good test to see if the problem is related to the URL you are using here or not.

Andy

Saby August 4, 2020

hi @Andy Heinzer ,

 

Figured that the webhook URL is not added in the JIRA whitelist, adding it all started working as it should =)

Thanks for your input and suggestions.

Regards

Saby

Like Andy Heinzer likes this
0 votes
Andy Heinzer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 9, 2018

Usually the problem with webhooks not functioning as expected as a post function is the order in which that webhook is set to fire.  By default when you add a webhook to a post function it places it in the #1 position.  This means that the web hook can fire even before Jira attempts to reindex that issue for the specific status change that was also triggered by the transition.   This can cause problems because it's a sort of race-condition where the webhook is being told to go now, but Jira hasn't actually updated the issue yet, change the status, updated the index, or fired the actual event that this webhook could be using as a configuration setting.

So first thing to try, move the 'fire a webhook' post function event to the very bottom of the post functions in that transition, and publish the changes to the workflow.  Then see if this works as expected or not.

If that doesn't help, please let me know the following:

  1. What version of Jira is this?
  2. Could you take screenshots of the webhook settings in Jira?  I'm curious to learn more about what events might be set in the options there.
Deleted user November 12, 2018

Hi,

We are working as suggested. We will get back to you after checking with user.

Thanks

Vasanta Kumaar
Contributor
July 1, 2019

Hi Andrew,

 

We also face same issue, I have reoredered the webhook in bottom of post function but still nothing is happening.

 

 1. JIRA Version : 7.1.0

Capture.JPGCapture1.JPG

Andy Heinzer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 2, 2019

@Vasanta Kumaar I can see in your webhook you have a JQL filter of

Project=WAYN and project ="CH Backlog"

I can tell you that if these are two different projects, then your JQL query will always return 0 Jira issues.  In turn this could prevent this webhook from ever working.  That specific query is only return Jira issues that can match both projects.  Since no issue can actually be in more than one project at a time, there are no Jira issues that can possibly match both elements at the same time.

Instead if you only want match against issues in either project try a query such as

project in (WAYN,"CH Backlog")

Or perhaps remove the JQL entirely.  You can control which projects use the specific workflow so that method would probably be preferred here so that this webhook is only fired for projects that use this specific workflow in question.

I hope that helps.

Andy

Like Vasanta Kumaar likes this
Vasanta Kumaar
Contributor
July 3, 2019

Hi Andrew,

Thanks a lot, Its working.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events