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
Next: Root
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
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
Hi Folks
How can I write a sql that returns only the first row of the result set.
For example:
This sql statement will return all issues of project XXX in ascending order
> project="XXX" ORDER BY createdDate ASC
I'd like to get the first issue from the return set. What is the syntax?
Thanks
J.N
Hi @John Nguyen ,
This is not possible out of the box, you would need an app such as SQL+JQL for that.
Antoine
Hi Antoine
Thanks for replying to my inquiry. I got the Structure Add-On and still I'm not able to figure out how get the first child form the result and at the same time I want to get the parents displayed as well...
So the requirements are like this:
1 - Display all the tasks.
2 - If a task has more than one sub-task whose status is in 'In Progress' state, then get the sub-task that has the due date that nearest to today's date...
So if I have a structure X (built by JQL) that show all the Tasks and all the sub-tasks that have current status = 'In Progress', then how can I write a S-JQL to meet the requirements mentioned above?
Thanks
J.N
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @John Nguyen ,
I do not have this plugin, but I have checked the documentation. Your 2nd requirement would require a CURSOR in SQL (or a loop), so I am not sure this is doable in Jira, and would be complex to implement if so.
Antoine
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Completely agreed.
The "Expr" language that comes with Structure does not provide any flow-control constructs and JQL does not provide CURSOR construct either.
I'm stuck on the rug :-).
But thank you very much for having given me the tips of how to process it. I really appreciate it.
Have a good day Antoine
J.N
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.