Uploaded image for project: 'Jira Software Data Center'
  1. Jira Software Data Center
  2. JSWSERVER-21280

"Epic Link" dropdown suggestions are not working properly due to changes introduced at JSWSERVER-21026 

XMLWordPrintable

      Issue Summary

      This is reproducible on Data Center: (yes)

      Implementation of JSWSERVER-21026 introduces some changes that were targeted to significantly improve performance for retrieving epics for epic picker in large environments with a lot of Epic issues. However, under some conditions, it is now no longer possible to get the correct and expected Epic Name suggestion list while typing the text.

      Steps to Reproduce

      So far, we were able to identify the following failure use-cases.

      1. Create some Epic issues with "EpicA", "EpicB", "EpicC" etc.
      2. As an example of Epic Link suggestions you could try creating any non-Epic issue:
        • Scroll down to Epic Link field and click on it to set focus. All issues will be returned as part of the suggestion:
      3. Start typing the name of the desired issue. While typing "epic" word there will be no suggestion returned until you type the full name of the issue (i.e. "epicA"):
        2_typing_epic_no_suggestions.mov

      Another example is the issue with hyphen character in the name:

      1. Create some Epic issues with the hyphen character in the name. For example, "ux-pretty-panel", "ux-pretty-button" and "ux-prima".
      2. Same as for the previous case, create a new issue and start typing the name of the desired issue. While typing character before hyphen suggestions will not work until the whole word will be typed. Next, after hyphen you will need again to type the whole next word to make suggestions work again:
        3_typing_epic_no_suggestions_hypen.mov

      Before JSWSERVER-21026 while requesting data for Epic Name suggestion, Jira simply queried all issuetype = "Epic"

      2022-03-14 15:51:43,245+0000 http-nio-8080-exec-6 DEBUG jira_admin 951x15667x1 11k4v0a 192.168.208.1,192.168.208.5 /rest/greenhopper/1.0/epics [c.a.j.i.search.providers.LuceneSearchProvider] JQL query: {issuetype = "Epic"} order by key ASC
      2022-03-14 15:51:43,247+0000 http-nio-8080-exec-6 DEBUG jira_admin 951x15667x1 11k4v0a 192.168.208.1,192.168.208.5 /rest/greenhopper/1.0/epics [c.a.j.i.search.providers.LuceneSearchProvider] JQL lucene query: type:10000
      

      After 8.22 where JSWSERVER-21026 was implemented the query logic became more sophisticated (see JSWSERVER-21026 JQL-based epic picker for detailed description):

      2022-03-14 17:00:43,273+0000 http-nio-8080-exec-5 DEBUG jira_admin 1020x1050x1 d21876 172.30.0.1 /rest/greenhopper/1.0/epics [c.a.j.i.search.providers.LuceneSearchProvider] JQL query: {project in ("SP")} AND ( {cf[10104] ~ "e"} OR {key in ("e")} ) AND {issuetype = "Epic"} order by key DESC
      2022-03-14 17:00:43,275+0000 http-nio-8080-exec-5 DEBUG jira_admin 1020x1050x1 d21876 172.30.0.1 /rest/greenhopper/1.0/epics [c.a.j.i.search.providers.LuceneSearchProvider] JQL lucene query: +projid:10000 +((+customfield_10104:e #nonemptyfieldids:customfield_10104 #visiblefieldids:customfield_10104) ()) +type:10000
      2022-03-14 17:00:43,277+0000 http-nio-8080-exec-5 DEBUG jira_admin 1020x1050x1 d21876 172.30.0.1 /rest/greenhopper/1.0/epics [c.a.j.i.search.providers.LuceneSearchProvider] JQL sorts: [<custom:"projkey": com.atlassian.jira.issue.search.parameters.lucene.sort.StringSortComparatorSource@b6e3f2c>!, <custom:"keynumpart_range": com.atlassian.jira.issue.search.parameters.lucene.sort.StringSortComparatorSource@4e6256e3>!]
      2022-03-14 17:00:43,282+0000 http-nio-8080-exec-5 DEBUG jira_admin 1020x1050x1 d21876 172.30.0.1 /rest/greenhopper/1.0/epics [c.a.j.i.search.providers.LuceneSearchProvider] JQL query: {project not in ("SP")} AND ( {cf[10104] ~ "e"} OR {key in ("e")} ) AND {issuetype = "Epic"} order by key DESC
      2022-03-14 17:00:43,284+0000 http-nio-8080-exec-5 DEBUG jira_admin 1020x1050x1 d21876 172.30.0.1 /rest/greenhopper/1.0/epics [c.a.j.i.search.providers.LuceneSearchProvider] JQL lucene query: +(#nonemptyfieldids:projid -projid:(10000) #visiblefieldids:projid) +((+customfield_10104:e #nonemptyfieldids:customfield_10104 #visiblefieldids:customfield_10104) ()) +type:10000
      2022-03-14 17:00:43,287+0000 http-nio-8080-exec-5 DEBUG jira_admin 1020x1050x1 d21876 172.30.0.1 /rest/greenhopper/1.0/epics [c.a.j.i.search.providers.LuceneSearchProvider] JQL sorts: [<custom:"projkey": com.atlassian.jira.issue.search.parameters.lucene.sort.StringSortComparatorSource@79608fac>!, <custom:"keynumpart_range": com.atlassian.jira.issue.search.parameters.lucene.sort.StringSortComparatorSource@25691b2d>!]
      2022-03-14 17:00:45,079+0000 http-nio-8080-exec-4 DEBUG jira_admin 1020x1051x1 d21876 172.30.0.1 /rest/greenhopper/1.0/epics [c.a.j.i.search.providers.LuceneSearchProvider] JQL query: {project in ("SP")} AND ( {cf[10104] ~ "ep"} OR {key in ("ep")} ) AND {issuetype = "Epic"} order by key DESC
      2022-03-14 17:00:45,080+0000 http-nio-8080-exec-4 DEBUG jira_admin 1020x1051x1 d21876 172.30.0.1 /rest/greenhopper/1.0/epics [c.a.j.i.search.providers.LuceneSearchProvider] JQL lucene query: +projid:10000 +((+customfield_10104:ep #nonemptyfieldids:customfield_10104 #visiblefieldids:customfield_10104) ()) +type:10000
      2022-03-14 17:00:45,082+0000 http-nio-8080-exec-4 DEBUG jira_admin 1020x1051x1 d21876 172.30.0.1 /rest/greenhopper/1.0/epics [c.a.j.i.search.providers.LuceneSearchProvider] JQL sorts: [<custom:"projkey": com.atlassian.jira.issue.search.parameters.lucene.sort.StringSortComparatorSource@3581f47f>!, <custom:"keynumpart_range": com.atlassian.jira.issue.search.parameters.lucene.sort.StringSortComparatorSource@1ac87eb5>!]
      2022-03-14 17:00:45,088+0000 http-nio-8080-exec-4 DEBUG jira_admin 1020x1051x1 d21876 172.30.0.1 /rest/greenhopper/1.0/epics [c.a.j.i.search.providers.LuceneSearchProvider] JQL query: {project not in ("SP")} AND ( {cf[10104] ~ "ep"} OR {key in ("ep")} ) AND {issuetype = "Epic"} order by key DESC
      2022-03-14 17:00:45,090+0000 http-nio-8080-exec-4 DEBUG jira_admin 1020x1051x1 d21876 172.30.0.1 /rest/greenhopper/1.0/epics [c.a.j.i.search.providers.LuceneSearchProvider] JQL lucene query: +(#nonemptyfieldids:projid -projid:(10000) #visiblefieldids:projid) +((+customfield_10104:ep #nonemptyfieldids:customfield_10104 #visiblefieldids:customfield_10104) ()) +type:10000
      2022-03-14 17:00:45,092+0000 http-nio-8080-exec-4 DEBUG jira_admin 1020x1051x1 d21876 172.30.0.1 /rest/greenhopper/1.0/epics [c.a.j.i.search.providers.LuceneSearchProvider] JQL sorts: [<custom:"projkey": com.atlassian.jira.issue.search.parameters.lucene.sort.StringSortComparatorSource@168eb8a5>!, <custom:"keynumpart_range": com.atlassian.jira.issue.search.parameters.lucene.sort.StringSortComparatorSource@4fea5117>!]
      2022-03-14 17:00:46,636+0000 http-nio-8080-exec-7 DEBUG jira_admin 1020x1052x1 d21876 172.30.0.1 /rest/greenhopper/1.0/epics [c.a.j.i.search.providers.LuceneSearchProvider] JQL query: {project in ("SP")} AND ( {cf[10104] ~ "epi"} OR {key in ("epi")} ) AND {issuetype = "Epic"} order by key DESC
      2022-03-14 17:00:46,637+0000 http-nio-8080-exec-7 DEBUG jira_admin 1020x1052x1 d21876 172.30.0.1 /rest/greenhopper/1.0/epics [c.a.j.i.search.providers.LuceneSearchProvider] JQL lucene query: +projid:10000 +((+customfield_10104:epi #nonemptyfieldids:customfield_10104 #visiblefieldids:customfield_10104) ()) +type:10000
      2022-03-14 17:00:46,638+0000 http-nio-8080-exec-7 DEBUG jira_admin 1020x1052x1 d21876 172.30.0.1 /rest/greenhopper/1.0/epics [c.a.j.i.search.providers.LuceneSearchProvider] JQL sorts: [<custom:"projkey": com.atlassian.jira.issue.search.parameters.lucene.sort.StringSortComparatorSource@18bb95fa>!, <custom:"keynumpart_range": com.atlassian.jira.issue.search.parameters.lucene.sort.StringSortComparatorSource@5117bb42>!]
      2022-03-14 17:00:46,644+0000 http-nio-8080-exec-7 DEBUG jira_admin 1020x1052x1 d21876 172.30.0.1 /rest/greenhopper/1.0/epics [c.a.j.i.search.providers.LuceneSearchProvider] JQL query: {project not in ("SP")} AND ( {cf[10104] ~ "epi"} OR {key in ("epi")} ) AND {issuetype = "Epic"} order by key DESC
      2022-03-14 17:00:46,646+0000 http-nio-8080-exec-7 DEBUG jira_admin 1020x1052x1 d21876 172.30.0.1 /rest/greenhopper/1.0/epics [c.a.j.i.search.providers.LuceneSearchProvider] JQL lucene query: +(#nonemptyfieldids:projid -projid:(10000) #visiblefieldids:projid) +((+customfield_10104:epi #nonemptyfieldids:customfield_10104 #visiblefieldids:customfield_10104) ()) +type:10000
      2022-03-14 17:00:46,648+0000 http-nio-8080-exec-7 DEBUG jira_admin 1020x1052x1 d21876 172.30.0.1 /rest/greenhopper/1.0/epics [c.a.j.i.search.providers.LuceneSearchProvider] JQL sorts: [<custom:"projkey": com.atlassian.jira.issue.search.parameters.lucene.sort.StringSortComparatorSource@4a46d714>!, <custom:"keynumpart_range": com.atlassian.jira.issue.search.parameters.lucene.sort.StringSortComparatorSource@26e7a8b5>!]
      2022-03-14 17:00:47,394+0000 http-nio-8080-exec-10 DEBUG jira_admin 1020x1053x1 d21876 172.30.0.1 /rest/greenhopper/1.0/epics [c.a.j.i.search.providers.LuceneSearchProvider] JQL query: {project in ("SP")} AND ( {cf[10104] ~ "epic"} OR {key in ("epic")} ) AND {issuetype = "Epic"} order by key DESC
      2022-03-14 17:00:47,395+0000 http-nio-8080-exec-10 DEBUG jira_admin 1020x1053x1 d21876 172.30.0.1 /rest/greenhopper/1.0/epics [c.a.j.i.search.providers.LuceneSearchProvider] JQL lucene query: +projid:10000 +((+customfield_10104:epic #nonemptyfieldids:customfield_10104 #visiblefieldids:customfield_10104) ()) +type:10000
      2022-03-14 17:00:47,397+0000 http-nio-8080-exec-10 DEBUG jira_admin 1020x1053x1 d21876 172.30.0.1 /rest/greenhopper/1.0/epics [c.a.j.i.search.providers.LuceneSearchProvider] JQL sorts: [<custom:"projkey": com.atlassian.jira.issue.search.parameters.lucene.sort.StringSortComparatorSource@5e47308a>!, <custom:"keynumpart_range": com.atlassian.jira.issue.search.parameters.lucene.sort.StringSortComparatorSource@33386be2>!]
      2022-03-14 17:00:47,402+0000 http-nio-8080-exec-10 DEBUG jira_admin 1020x1053x1 d21876 172.30.0.1 /rest/greenhopper/1.0/epics [c.a.j.i.search.providers.LuceneSearchProvider] JQL query: {project not in ("SP")} AND ( {cf[10104] ~ "epic"} OR {key in ("epic")} ) AND {issuetype = "Epic"} order by key DESC
      

      Current logic uses partial user input as a source of CONTAINS operator which, indeed, will not return the expected result in such case:

      1. "Epic Name" ~ "epi"
      2. To get all possible results asterisk ("*") characters should be used in the query:
      3. For the other use-case, the hyphen character needs to be additionally escaped:
        "Epic Name" ~ "ux\"-\"pr*"

      Expected Results

      Suggestions for Epic Name will be returned while typing part of possible Epic's name (like it was before changes introduced at JSWSERVER-21026)

      Actual Results

      In some cases, suggestions are not returned until the whole Epic name (or whole part before hyphen character) is typed

      Note on fix

      In the fixed version you'll be able to find "Technical Epic" by typing "T", "Techni", "nical", "Epi", "TECHNIC" and so on (i.e. case-insensitive substring search).

      Workaround

      Possible workaround would be enabling com.atlassian.jira.agile.darkfeature.legacy.epic.picker.enabled dark feature that reverts to the old mechanism of retrieving name for the epic picker.
      Note that it is not recommended approach and might cause performance degradation over 100 000 epics.

              kcichy Kamil Cichy (Inactive)
              e7e12f16f891 Alexander Artemenko
              Votes:
              62 Vote for this issue
              Watchers:
              82 Start watching this issue

                Created:
                Updated:
                Resolved: