Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

JQL - how to get the first issue of returned set?

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

 

1 answer

0 votes
Antoine Berry Community Leader Jul 10, 2019

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

Antoine Berry Community Leader Aug 28, 2019

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

Hi @Antoine Berry 

  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

Like Antoine Berry likes this

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Marketplace Apps & Integrations

☕️ Monday coffee with Jexo: Weekly Atlassian news roundup | 21st June 2021

Hi community 👋, as every Monday we're bringing you a quick update on what happened in the Atlassian ecosystem last week. There were a few interesting events like for example the announcement of th...

56 views 0 6
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you