Uploaded image for project: 'Elements Connect'
  1. Elements Connect
  2. CO-3654

JQL search fails when a condition is set on any field AND a connect field AND $userInput is used in the Connect query

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Done
    • Affects Version/s: 6.1.4
    • Fix Version/s: 6.1.5
    • Labels:
      None
    • Functional components:
      Search

      Description

      How to reproduce

      Configure a connect field with a dependency to $userInput:

      • Datasource: Jira JQL
      • Edit Query:
        project = $userInput
        

         

      • Template: 
        {summary}
        

         

      • Display query: 
        id in ($currentCustomfieldValue.intList())
        
      • Search query:
        #if($context.name == $context.SEARCH_BASIC_GENERATE_OPTIONS || $context.name == $context.SEARCH_ADVANCED_GENERATE_OPTIONS)
            #if($currentCustomfieldValue != '')
                id in ($currentCustomfieldValue.intList())
            #else
               project = $userInput
            #end
        #elseif($context.name == $context.SEARCH_BASIC_GENERATE_JQL_QUERY)
            id in ($currentCustomfieldValue.intList())
        #end
        

      From the issue searcher (basic mode):

      • 1. add a condition to any field (project, issue type, priority, ...)
      • 2. add a condition to the Connect field
        (order is important! if our Connect field is added before any field - everything works!)

      Problem1:

      • 3. execute basic search

      Current result
      No results, even if results exist. In the url we can see that Connect field is not correctly evaluated: we can see inputValues in the url.

      Expected
      Basic search returns correct result(s)

      Problem2:

      • 3. switch to advanced mode

      Current result
      The JQL query is invalid

      project = CA AND "Issue picker" = "{\"inputValues\":[\"10009\"]}"

      Search does not return any result

      See a video of the bug in action: https://youtu.be/m3uv4Md1ZUs

      Expected

      The JQL query is valid

      "Issue picker" = "CA Venus [10009]"

      the search returns the expected results

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              christophe.prome@valiantys.com Christophe Promé
              Reporter:
              christophe.prome@valiantys.com Christophe Promé
              Votes:
              2 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: