I have tried setting up a webhook using JQL by Script Runner and the hook never appears to fire. Is this possible to setup? I tried using standard JQL and it worked fine and I tried the Script Runner JQL in the issue browser so I know that both parts work independently but don't work together
I am trying to do the following:
issueFunction in linkedIssuesOf("issuetype = Epic and resolution is empty", "is epic of")
As far as I can see it works, I tested with:
issueFunction in hasSubtasks()
Can you go to one of the issues you think the hook should fire on, let's say the key is JRA-1.
Then try to run the query:
issueFunction in linkedIssuesOf("issuetype = Epic and resolution is empty", "is epic of") and key = JRA-1
Does this return the one issue? If not maybe you have your links the wrong way round.
What events are you listening for?
@Jamie Echlin [Adaptavist] - I've recently run into this as well and have been playing around with this the last 2 days. I set up a bogus URL so I see the webhook failures in my log file. I easily set up a web hook for both events & on post functions using a regular JQL search. Then I tried setting up a webhook using ScriptRunner JQL functions on a post function. I noticed something peculiar. The original JQL I was using with my webhook was issuetype = 'A' and issueFunction in subtasksOf('issuetype = B and issueFuncion in linkedIssuesOf("issuetype = C and labels = a-label", ALink)'). I double checked to make sure that the issue I tested on matched the JQL. Nothing appeared in the log (neither the expected failed webhook call or a failure in starting the webhook). I tried other randomish ScriptRunner JQL functions with the same result (nothing). Then I tried issuetype = A and issueFunction in hasLinkType("Duplicate") (I tried this because there are very few ~300 matches and it's fairly simple JQL). This fired the webhook. I wonder if this is because of how long the JQL searches take. I'm not sure how to go about testing this though.
How long does the long-running query take? In the most recent version there is a profiler thingy - https://scriptrunner.adaptavist.com/latest/jira/jql-functions.html#_query_profiler - which will show you how long it takes. But, I don't remember see any reference to a timeout when I looked at the code.
Hello! My name is Genevieve Blanch, and I'm the Marketing Manager at RefinedWiki, creators of apps to give teams the tools to customize Atlassian platforms. Currently, 44% of the tech team at Re...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG