You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
Example: I need to find out the last 3 deployments for a particular service.
My JQL would look something like this:
project = GPROD AND issuetype = Logbook and "service name" = service-name
ORDER BY created DESC AND ( ?? display only 3 tickets ?? )
I am looking for the last part of this query - to be able to retrieve a particular number of tickets
Short answer: no, that is not possible.
Longer answer: JQL is not a SQL, and so does not have most basic features of a SQL. Depending upon why/how you need the first 3 (or first N), you could create a dashboard with a issue filter gadget and try to limit the results or investigate marketplace addons for purchase to extend JQL features.
If you needed this for some type of reporting, you could use an automation rule to limit the result set, and send an email, post to Slack/Teams, etc. with just the first-N items.
Thank you all for your feedbacks.
I eventually resorted to use Python for-loop along with a max_results counter variable to control how many answers to get.
Jack - the reason for getting the top 3 incidents of a particular service was because this is what they asked me to deliver. A service could potentially have several SEV incidents over time so they only wanted to see the last 3 incidents for a particular service.