Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JIRA JQL select issues where issuekey contains key

I can select JIRA issues using this JQL query:

issuekey >= PRJ-23

results:

PRJ-23
PRJ-24
...
PRJ-2345
...

How can I select JIRA issues using "contains-like" operator? Smth. like:

issuekey contains "PRJ-23"

results:

PRJ-23
PRJ-230
PRJ-231
...
PRJ-2345
...

Thanks.

like image 918
Alex Gusev Avatar asked Nov 10 '22 01:11

Alex Gusev


1 Answers

I am unaware of any way to do this with straight JQL, but there are other ways to get what you need:

1) If you want to run this on an external service, you can access the REST API for the Issue Picker.

You can see one example of how it works in Atlassian's REST API browser for jira.atlassian.com.

The query field contains the substring match that you want to find (eg. "CONF-301"). The currentJQL field also contains the JQL that describes the set of issues in which you want to find substring matches (eg. "project=CONF"). You can also fire up your web browser's debugger, go to view any issue in JIRA, click More->Link, type your substring into the search box, and look in your debugger's Network tab to see what requests it is making to the REST API above. Note that this interface is not documented (ie. it's not a public API and is subject to change without warning in future versions of JIRA).

2) If you are building a JIRA plugin instead, then the Issue Picker Search Service is listed as a public API, which you should be able to have injected into your plugin. This is the same service that is used by the above REST API.

like image 76
Scott Dudley Avatar answered Dec 05 '22 14:12

Scott Dudley