Forums

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

Scriptrunner/JQL question. I have a JQL entry that works in jira search...

Eric Sebian
Contributor
February 4, 2022

but it doesnt work the same way in a webhook.

project = jcd and issuetype = Homepage and comment ~ "rumba" AND issueFunction in lastComment("before 1m") AND issueFunction in lastComment("after -1m")

the above search only finds comments with the word "rumba" in  them. And are only a minute old. this is great because it reduces noise in the communication  channels such as MS teams or slack. Unfortunately, it doesnt work the same way when applied to a webhook. Do webhooks recognize scriptrunner's added jql functionality?

Thoughts?

THanks.

1 answer

0 votes
PD Sheehan
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 4, 2022

According to developer documentation for webhooks they are executed "without a specific user context".

My guess is that the scriptrunner issueFunction (at least the lastComment function) requires this context and fails silently when executed within the webook.

You can try to just use "updated > -1m" since commenting on an issue by default also causes the associated issue updated to be refreshed.

Eric Sebian
Contributor
February 6, 2022

bare with me please. So do you mean scrap the sql that I mentioned or add the updated > -1m to it? thanks. 

PD Sheehan
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 7, 2022

The final result would look something like this:

"project = jcd and issuetype = Homepage and comment ~ "rumba" and updated > -1m"

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
VERSION
8.17.1
TAGS
AUG Leaders

Atlassian Community Events