Uploaded image for project: 'SR for Confluence - Development'
  1. SR for Confluence - Development
  2. SRCONF-771

CQL Preview Search Link Automatically Searches with the Last Type of Search Used

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Done
    • Medium
    • Resolution: No Further Action Needed
    • 6.28.0
    • 6.52.0
    • Advanced CQL Search
    • None
    • Sprint 211
    • 0.7

    Description

      This deals with the search preview in the CQL clause field in Script Jobs. This field automatically searches when the user is done typing in the CQL search query. It provides the number of results, along with a link to those results. The CQL search works by using Confluence's search page, and the bug is that it automatically uses the type of search that was last used in Confluence. Confluence has two search types, Basic and Advanced CQL. If someone searches using a Basic Search, and then they try to use the automatic search feature in this field in one of the Script Jobs, the link will direct them to the Confluence search page and it will show the results via whatever search was used last, either Basic or CQL. 

      The actual search works fine, and the correct number of results are returned. The issue comes when using the URL to view the search results. If the last search was a CQL search, everything works fine, and you don't notice the bug. However, if the last search was a Basic search, it will automatically search using the Basic search, but uses the CQL that it was given, meaning that the results will be incorrect. This should search with a CQL search every time. 

      Introduced by the bugfix for SRCONF-435 (which fixed the CQL clause field's automatic search)

      Steps to Reproduce: 

      1) Search for something with a Basic search in Confluence

      2) Go to the create screen for Script Jobs and choose one of them that uses the CQL clause field. 

      3) Enter some valid CQL and click on the link that appears when you are done typing. 

      4) View the search results (it will show the search ran as a Basic search instead of an Advanced CQL Search. 

      After looking into this, I can see that something is extra is added to the URL - "siteSearch~" and no matter what I passed to the URL, it still was overwritten by the siteSearch~ param that was appended after the page loaded. This piece of the URL only shows up after a Basic Search is ran. (shown in screenshot)

      Workaround: After viewing the search results by clicking the link, click the Advanced CQL Search button to switch to the Advanced search and click on the search button to redo the search. 

      Attachments

        Issue Links

          Activity

            People

              jyamdogo Josh Yamdogo
              ccreswell Carmen Creswell [X] (Inactive)
              Votes:
              3 Vote for this issue
              Watchers:
              12 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: