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 

      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.

          Form Name

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

            try escaping the left and/or right brackets with a backslash - or use an ampersand as a wildcard after PROG

            Jim Malgieri added a comment - try escaping the left and/or right brackets with a backslash - or use an ampersand as a wildcard after PROG

            99d6959fc943 try escaping the left and/or right brackets with a backslash - or use an ampersand as a wildcard after PROG

            Jim Malgieri added a comment - 99d6959fc943 try escaping the left and/or right brackets with a backslash - or use an ampersand as a wildcard after PROG

            Hi all,

            We have also faced this issue in 8.13.22 after upgrading from 8.13.15. Example of Epic Name that is impossible to find now -  [02] PROGRESS.

            One more workaround is to search by Epic's issue key. In this case Jira returns valid results. 

            Artem Tikhobaev added a comment - Hi all, We have also faced this issue in 8.13.22 after upgrading from 8.13.15. Example of Epic Name that is impossible to find now -   [02] PROGRESS . One more workaround is to search by Epic's issue key. In this case Jira returns valid results. 

            JSWSERVER-21026 improved the performance of the epic picker, but unfortunately it came with annoying bugs.

            JSWSERVER-21280 (this issue) fixes these bugs and is currently awaiting release. 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).

            Kamil Cichy (Inactive) added a comment - JSWSERVER-21026  improved the performance of the epic picker, but unfortunately it came with annoying bugs. JSWSERVER-21280 (this issue) fixes these bugs and is currently awaiting release. 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).

            We have the same problem on 8.20.8. Makes working with Epics harder. The workaround does not work.

            Hyphens do not work and give us no suggestion at all.
            Eg.: "epic - " gives us no suggestion even though we have multiple "epic - 1", "epic - 2" usf.

            Simon König added a comment - We have the same problem on 8.20.8. Makes working with Epics harder. The workaround does not work. Hyphens do not work and give us no suggestion at all. Eg.: "epic - " gives us no suggestion even though we have multiple "epic - 1", "epic - 2" usf.

            We are currently on Jira version 8.20.8 and are experiencing this problem.  Do we know if the solution in 8.22.0 will be back ported to older versions such as ours?

            Mark.Bonifay added a comment - We are currently on Jira version 8.20.8 and are experiencing this problem.  Do we know if the solution in 8.22.0 will be back ported to older versions such as ours?

            Mathias Merbold added a comment - - edited

            The error occours in Jira 8.20.8 too.

            Mathias Merbold added a comment - - edited The error occours in Jira 8.20.8 too.

            We are using Jira version 8.20.7 and have the same problem.

            Vincent Jansen added a comment - We are using Jira version 8.20.7 and have the same problem.

            The workaround doesn't change the behaviour if the Epic-Link auto-suggestion. At least not in our environment with Jira 8.22.0

            Andre Lehmann added a comment - The workaround doesn't change the behaviour if the Epic-Link auto-suggestion. At least not in our environment with Jira 8.22.0

              kcichy Kamil Cichy (Inactive)
              e7e12f16f891 Alexander Artemenko
              Affected customers:
              62 This affects my team
              Watchers:
              81 Start watching this issue

                Created:
                Updated:
                Resolved: