Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-12928

Search filters is not taken into account on null field in local extension repository

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 7.1.4
    • Fix Version/s: 7.4.1
    • Component/s: Extension
    • Labels:
      None
    • Tests:
      Unit
    • Difficulty:
      Unknown
    • Documentation:
      N/A
    • Documentation in Release Notes:
      N/A
    • Similar issues:

      Description

      Steps to reproduce:

      On a wiki page, paste this code:

      {{groovy}}
      import com.xpn.xwiki.web.Utils;
      import org.xwiki.extension.repository.search.ExtensionQuery;
      
      def localExtensionRepository = Utils.getComponent(org.xwiki.extension.repository.LocalExtensionRepository.class);
      
      def query = new ExtensionQuery();
      
      println "= All extensions ="
      for (def extension : localExtensionRepository.search(query)) {
        println "* " + extension.getName();
      }
      
      println "= Flavors ="
      query.addFilter("category", "flavor", ExtensionQuery.COMPARISON.EQUAL);
      for (def extension : localExtensionRepository.search(query)) {
        println "* " + extension.getName();
      }
      {{/groovy}}
      

      See the results: the filter is not taken into account in the second search. The results are exactly the same.

        Attachments

          Activity

            People

            • Assignee:
              tmortagne Thomas Mortagne
              Reporter:
              gdelhumeau Guillaume Delhumeau
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: