The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

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

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

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 Champions.
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 Champions.
February 7, 2022

The final result would look something like this:

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

DEPLOYMENT TYPE
SERVER
VERSION
8.17.1
TAGS
AUG Leaders

Atlassian Community Events