Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Rest API - Search Issues by Description AND / OR Project AND / OR Key

daniel.kirchhof
April 5, 2023

Hello,

 

I'm trying to implement a search field where I can find issues by its description or project key, the issue key or a combination of them.

But I'm not really satisfied with the rest api at all...

 

So here are some example use cases:

  1. "test": Get all issues with "test" in its description or comment or whatever
  2. "PRO" Get all issues of project "PRO"
  3. "PRO-1": Get all issues with "PRO-1" in its key ("PRO-1", "PRO-11", "PRO-12", "PRO-124" ...)
  4. "PRO test": Combination of 1 and 2
  5. "PRO-1 test": Combination of 1 and 3.

I started to use the issue picker api with more or less success.

  1. `api/3/issue/picker?query=test` ✅
  2. `api/3/issue/picker?query=PRO` ✅
  3. `api/3/issue/picker?query=PRO-1` ✅
  4. `api/3/issue/picker?query=PRO test` ❌
  5. `api/3/issue/picker?query=PRO-1 test` ❌

Okay, no luck with 4. and 5. So I included `currentJQL`.

4. `api/3/issue/picker?query=test&currentJQL=Project=PRO` ✅
5. `api/3/issue/picker?query=test&currentJQL=Key~PRO-1` ❌

Well, 4 is working now, but 5. isn't, because I can't use `~` in JQL.


It is so weired that I can search by the key if I don't include anything else but can't if I'm searching for other words.

 

Another thing: If I want to include all issues (not only issues where I participated anyhow), I have to use an empty `currentJQL` parameter, so the "current search" will return something.

 

The `api/3/search` enpoint doesn't fit the requirements as well. Can't search with wildcards...

 

I'm thinking about to exclude some possibilities, so the user could only search

  1. All issues by its descriptions
  2. All issues by its keys (with wildcard, but without an additional query)
  3. All issues by its descriptions and the EXACT project key

But the user experience will suffer, cause refinements of the search input wouldn't be straight forward and not really understandable.

 

 The last option would be: Query all issues of all projects, save them somewhere and use my own search engine.

 

By the way: Some ids or keys are integers others are strings?!

And why doesn't return the api a 401 if I'm not logged in / the api key is missing? It returns 200 with an empty result?!

 


 

Actually my question could be: How to solve the problem. But maybe its not a question anymore - its more a thread about frustration...

 

Cheers,

Daniel

2 answers

1 vote
Nic Brough -Adaptavist-
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 Champions.
May 28, 2018

There is no way to do this, because it is absolutely not Scrum, and makes sprints pointless.

In a sprint, you commit to doing a set of stories.  At the end of the sprint, you have either delivered each story or you have not.  There is no partial completion, that's useless to the end-user, it's either done or it is not. 

So, your story points only get counted on "done".  You can't get any useful measure of the sprint out if you are saying "partial" on things.

If you feel the need to split things up as you describe, then you should split your stories up, ideally before starting the sprint.

0 votes
Ollie Guan
Community Champion
May 27, 2018

Hi @Kavitha Kandula,

I think there is no concept of partial completion in Scrum, and unfinished stories and story points are removed from the current iteration and counted into the next iteration

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events