Forums

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

Like named departments in JQL search

Matthew Gaffney
Contributor
July 30, 2019

When doing a JQL advanced search we have an issue with like named departments. We want to see everything where

Department ~ "Technology"

but not see

Department ~ "Educational Technology Media Services"

 

We found that we can exclude the Media Services issues by including a search similar to this: 

Department ~ "Technology" AND Department !~ "Media"

 

But really this is all part of a larger advanced search for multiple departments within a college. We'd like to come up with a way to find all these departments without having to exclude any other like named departments across campus. 

 

Another couple of departments are even closer in name "Health & Recreation Services" and "Health, Recreation & Community Services". 

 

Any clarity anyone can provide is much appreciated. 

Thank you! 

3 answers

1 accepted

0 votes
Answer accepted
Matthew Gaffney
Contributor
August 5, 2019

After working through with support, it took a re-index to have the full effect. 

This was the fix:

I assume you connected the "Department" field with a user Profile field. In the "User Profile Settings" under "User Profile Fields" you can change the configuration of the search template. In your case I would recommend the "Exact Searcher" for your case. This enables you to search for an exact term with the EQUALS operator "=" instead of the CONTAINS operator "~".

0 votes
Matthew Gaffney
Contributor
July 30, 2019

With the AddOn Script Runner it is possible to search for the exact text phrase. Just use the term: issueFunction in issueFieldExactMatch("SubQuerry", "Field Name", "Field Value")

0 votes
Matthew Gaffney
Contributor
July 30, 2019

Searching and working internally we found this article and think maybe using a Required term: + might help?

 

https://confluence.atlassian.com/jiracoreserver073/search-syntax-for-text-fields-861257223.html

Matthew Gaffney
Contributor
July 30, 2019

Except for (Department ~ "+Technology") doesn't exclude "Educational Technology & Media Services".

Matthew Gaffney
Contributor
July 30, 2019

(Department ~ "+Technology -Media") is the best we've come up with so far. But we are looking for a solution that is an exact search on the custom field "Department" tied to the User Profiles for JIRA app. Exact searches should future proof this when department names change or are added. 

Matthew Gaffney
Contributor
July 30, 2019

It looks like this is something that people have wanted for a decade:

https://jira.atlassian.com/browse/JRASERVER-21372

Matthew Gaffney
Contributor
July 31, 2019

Further we spoke to the folks at Communardo Support (User Profiles for JIRA):

I assume you connected the "Department" field with a user Profile field. In the "User Profile Settings" under "User Profile Fields" you can change the configuration of the search template. In your case I would recommend the "Exact Searcher" for your case. This enables you to search for an exact term with the EQUALS operator "=" instead of the CONTAINS operator "~".

 

This change didn't fix our issue, so we reached back to them again:

This is actually not related to our app. There are two feature requests at Atlassian for this:

Please watch those issues if you want to be notified about any changes and vote for them. Atlassian is gathering interest and therefore also looking how many customers are voting for it.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events