Aloha,
We have an app thats integrated with Jira which allows users to search through their Jira tickets etc. We do this by submitting a web form, taking the parameter and generating a JQL query similar to:
summary ~ "Search Terms" OR description ~ "Search Terms" OR comment ~ "Search Terms"
I'd like to have the ability to also search by issue id - like FOO-1234 - so the user could just enter search text or an issue id etc in the same search box (like how Jira itself handes search in top right corner of app).
Problem is that the issuekey requires a specific format, otherwise it errors and does not perform a search - i.e.:
summary ~ "Search Terms" OR description ~ "Search Terms" OR comment ~ "Search Terms" OR issuekey = "Search Terms"
=> The issue key 'Search Terms' for field 'issuekey' is invalid.
I would think this is a common search approach - but cant find any documentation/answers on how to do this. Thanks in advance!
That I guess you should do a bit of checking before submitting the JQL from your app. If it matches a '[A-Z]*-\d+' pattern submit it as 'issuekey = ' else submit it as 'summary ~ <<>> OR description ~ <<>> OR comment ~ <<>>'. By behaviour the 'Quick Search' also does the same.
Thanks Renjith - I ended up going with that approach. Wasn't sure if I missed something in the docs because this seems like a common use case. Also - instead of my original question above using summary, description etc, Im now using:
text ~ "Search Terms"
Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.