JQL for @mentions based on when the mention happened, not the update date of the issue

Heather Barcomb December 10, 2024

I've seen several posts about this, but I still haven't found a solution.  I even came across https://jira.atlassian.com/browse/JRASERVER-27594 which makes me think it's not possible, but I figured I'd ask once just to see.

Looking for a way to search for @mentions for a user but refine it based on when that mention happened, not the update date of the issue.  Meaning.. show me all issues where "comment ~ currentUser()" when the mention itself was in the last X days.

I've seen several posts (including https://community.atlassian.com/t5/Jira-articles/How-to-search-for-your-mentions-with-JQL/ba-p/2771763) that say to use "updated" with some timeframe specified, but this isn't helpful.  If I want to see my mentions for the last week, and I use "updated >= -7d", if I was mentioned in an issue 3 months ago, but the last comment was yesterday, the issue is included in the results.

I'm pretty sure there's no way to do this OOB, but maybe there is with scriptrunner?  That's the only plugin I have access to.  If it matters, this is Jira Data Center, not Cloud.

1 answer

1 vote
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 10, 2024

Hello @Heather Barcomb 

ScriptRunner for Jira DC does not appear to have a solution that looks at both a comment's content and its creation date for filtering.

https://docs.adaptavist.com/sr4js/latest/features/jql-functions/included-jql-functions/comments

Let us back up a step. What problem are you trying to solve by having a filter that tells you issues in which a user was mentioned in the past X days? If we understand the problem needing to be solved, perhaps we can suggest alternative solutions.

Heather Barcomb December 11, 2024

The problem to solve is just a situation where I want to see all issues where someone asked me a question via a mention in the last X days (maybe I was on vacation or something).  The only other solution is to rely on email notifications, but something where I can just search via JQL or scriptrunner for "all issues in which I've been mentioned in the last X days" would be more reliable.  

From googling, this isn't an uncommon ask (people in my company have asked for this).  Even the comments of the JIRASERVER issue I linked in my description has people asking about it.  And someone even created a paid plugin for it.

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 11, 2024

Thank you for sharing your use case. It sounds like a useful feature.

Have you provided that use case directly to Atlassian? Your Jira Administrators could create a support ticket to provide that information to Atlassian.

Heather Barcomb December 12, 2024

I hsvr not, I wanted to confirm that I wasn't overlooking an already-existing solution.  Based on the fact that the JIRASERVER issue above is 12 years old, I'm guessing Atlassian wouldn't do anything about it.

Suggest an answer

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

Atlassian Community Events