Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How is this issue form made

uidev February 24, 2021

I've written an issue form submission plugin that look almost like this atlassian "Ask a question" form that I've used to submit this question. I am trying not to reinvent the wheel and so I am curious how forms such as these are typically made, whereby the search bar looks up similar issues for you to select before creating a new issue?

 

In particular, I'm wondering how does the backend to this form search for similar issues and documents? The way I am currently doing it is it removes mundane words like "with", "his" and reserved JQL words like "distinct" until what are left are just "keyword" words the user input and then perform a JQL query finding issues with similar summaries.

 

For instance, if the user typed in "keyword1 with keyword2 and keyword3" the resulting portion of the JQL for finding similar issues would look like:

`summary ~ keyword1 OR summary ~ keyword2 OR summary ~ keyword3`

 

Is that effectively how it is done for this form or forms like it that others may have created? Or are there much better approaches I'm missing? For instance I see Atlaskit supports a [Global Search](https://atlaskit.atlassian.com/packages/search/global-search) component. Is global search what is being used under the covers? The docs show you need a cloudId prop, or can this be used for Jira DataCenter too?

 

Again, I have a working prototype but I'm just curious how others solve this issue and what the best practices are. Thank you

1 answer

0 votes
Darryl Lee
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 24, 2021

Hey there - I don't know about the backend, but in researching this answer I snooped around using the Network tab of Chrome Developer tools to see what calls were being made during a KB article lookup.

As I recall, there was some live processing of whatever I typed and it would continue adding to the query as I typed:

https://MYSITE.atlassian.net/rest/servicedesk/knowledgebase/latest/articles/search?project=HELP&query=VPN%20help&spaceKey=HELP

So I took a look just now and if I type very slowly, it sends a query for partial words.

https://MYSITE.atlassian.net/rest/servicedesk/knowledgebase/latest/articles/search?project=HELP&query=What%20is%20the%20essen&spaceKey=HELP

So at least on the client side, it's not smart enough to remove mundane words like "a", or "the", nor is it even waiting until I hit the spacebar or any punctuation characters. So that seems a little inefficient.

On the other hand, the backend returns results pretty quickly. Now this is for querying the knowledgebase in Confluence, not Jira, so it's possible that it maintains an index or has code that is better suited for natural language searches like this.

Anyways, hope this helps.

uidev February 25, 2021

Cool, that is some nice information about things to keep in mind on frontend. I too am thinking it'd be good to have a delay mechanic so you aren't just firing off a request for each and every character.

 

But my question is more on the backend. Is JQL the way I'm applying it make sense? Be interested to hear from others tricks of the trade. I've also been thinking using labels on issues for certain keywords would make a better search criteria than summary text to avoid misspellings, etc.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events