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

Rita YOUNES [Infosysta]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 10, 2016

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

 

1 answer

0 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 10, 2016

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
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 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?

Rita YOUNES [Infosysta]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 10, 2016

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?

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 10, 2016

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?

Rita YOUNES [Infosysta]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 10, 2016

@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
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 10, 2016

It is now clear smile

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 11, 2016

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.

Rita YOUNES [Infosysta]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 11, 2016

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

Ignacio Pulgar
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 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.

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 11, 2016

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