I need to get the latest result of that search query JIRA

Is there a way to get the latest result of the search query (JQL )In JIRA?

 

1 answer

0 vote

I'm not sure the question is clear.  The correct answer to the question as stated is "To get the latest result of a query, run the query again", but I think there is more to the question than that

My guess is that there is something more behind the "get" part of the question.  I suspect you want an export of the results, or you want to do the "get" remotely so some other system gets the results and can work with them.  Is that right?

Ignacio Pulgar Community Champion Mar 10, 2016

Hi Nic! Yes, the question is a little bit ambiguous.

I understand that she wants to retrieve just one issue from the JQL search: instead all that matches the query, retrieve just the issue shown in the last place.

So, if she orders the query by updatedDate, she would want to retrieve just one issue: the issue that was updated the most time ago.

Rita, can you clarify your question?

Hello @Nic Brough [Adaptavist] , @Ignacio pulgar

What I'm trying to do that i need to run a query , the result of this query for example 10 issues.

What I'm searching to do is to get the latest issue for every user

Is that clear?

I'm not sure I understand the requirement, but

  1. Is Ignacio's suggestion that you only want to get one issue correct?
  2. What do you mean by "latest"?  Most recently created?  Updated?  Commented, Past a due date, etc

The other question is "where" - what is this query for and where are you running it?

@Nic Brough [Adaptavist]

for example here is my query project = Test  AND status = "Approved AND assignee in (currentUser()) ORDER BY updatedDate DESC

it gave me 4 issues:

Tst-130

Tst-104

Tst-80

Tst-40

 

What I need is the latest issue I have as current assignee.

I want in the JQL to gave me only the Tst-130

I hope it is now clear

Ignacio Pulgar Community Champion Mar 10, 2016

It is now clear smile

Yep, "latest" = "last updated (by any edit, comment or transition)

The short answer is that JQL is for finding issues that match criteria on them, not selecting within a list of answers.  So it doesn't have a way to do this.

You need to find a way to limit the results from a search in whatever you are reporting the results of the search in, not mangle the search.

@Nic Brough [Adaptavist] we cannot do this in a jql ?

Ignacio Pulgar Community Champion Mar 11, 2016

I think Nic will agree there's no built-in way of doing so in JQL.

You will definitely need a plugin which helps you with this purpose.

I'd accept Pablo Beltran's answer, adding that it is not possible to get what you want through the mere use of JQL.

Regards.

Nope, Ignacio covers it - you need code.  JQL is for finding all the issues that match, not selecting within the answers you get.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published yesterday in Jira Service Desk

Wy are we still using email for Service Desk workflows?

...attest to the experience of an urgent approval that gets lost in the boss’s inbox and requires that special “Please Approve” email or text message. In an age where we have distributed teams...

111 views 0 2
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you