How to create JQL queries for finding tickets by user ID in content

Hey everyone! I’m working on connecting our system with Jira and need some help with query syntax.

Basically, I want to build a URL that opens Jira search results when users click a link in our app. The goal is to show all open tickets that mention a specific user ID anywhere in the ticket description or comments.

I’m planning to use JQL (Jira Query Language) as a URL parameter, but I’m stuck on the exact syntax. How do I write a query that searches for a particular user identifier within the ticket content?

Any help would be awesome!

Use text ~ "userID" in JQL to find tickets mentioning a specific user. Try something like text ~ "user123" AND status != Closed for open tickets only. Don’t forget URL encoding - replace spaces with %20 and quotes with %22. Put the user ID in quotes to avoid partial matches. Heads up: Jira’s text search has indexing delays, so recent comments might not show up right away. Test your URL in different browsers if you run into issues.

Building on the text search idea, try using multiple fields for better results. This query (description ~ "userID" OR comment ~ "userID") AND resolution = Unresolved targets description and comment fields directly instead of doing a broad text search. It’s more reliable in some Jira setups. Your final URL should look like https://yourjira.com/issues/?jql=description%20~%20%22user123%22%20OR%20comment%20~%20%22user123%22%20AND%20resolution%20=%20Unresolved. Just heads up - comment searches need the right permissions and won’t work if your Jira has restricted comment visibility.

quick tip - if text search returns too many results, add project filters like project = "PROJ" AND text ~ "userid123". also check with your Jira admin about custom fields containing user data - these won’t show up in regular text searches. you might need to search specific fields instead.