web-mdm-dashboard icon indicating copy to clipboard operation
web-mdm-dashboard copied to clipboard

Search nested criteria

Open Gianfranco97 opened this issue 6 years ago • 3 comments

Describe the solution you'd like It is necessary to create the possibility of searching through nested criteria

Additional context

  • https://glpi.userecho.com/communities/1/topics/865-improve-search-options-of-it-assets-improvement-2-add-associative-property-explicitly#
  • https://glpi.userecho.com/communities/1/topics/867-improve-search-options-of-it-assets-improvement-3-simplify-and-extend-global-searches
  • https://glpi.userecho.com/communities/1/topics/323-use-jquery-querybuilder-for-multi-criteria-search-engine

Gianfranco97 avatar Oct 03 '18 12:10 Gianfranco97

Feature not yet available in glpi, waiting for implementation

Gianfranco97 avatar Oct 03 '18 13:10 Gianfranco97

ex

corresponding array passed to sql construction:

Array
  (
      [link] => OR
      [criteria] => Array
          (
              [0] => Array
                  (
                      [field] => 2
                      [searchtype] => contains
                      [value] => test
                  )
  
              [1] => Array
                  (
                      [link] => OR
                      [field] => view
                      [searchtype] => contains
                      [value] => toto
                  )
  
              [2] => Array
                  (
                      [link] => AND
                      [field] => 3
                      [searchtype] => equals
                      [value] => 11
                  )
  
              [4] => Array
                  (
                      [link] => AND
                      [criteria] => Array
                          (
                              [0] => Array
                                  (
                                      [field] => view
                                      [searchtype] => contains
                                      [value] => test3
                                  )
  
                              [1] => Array
                                  (
                                      [link] => AND NOT
                                      [field] => view
                                      [searchtype] => contains
                                      [value] => test4
                                  )
  
                          )
  
                  )
  
          )
  
  )

orthagh avatar Oct 03 '18 13:10 orthagh

See https://github.com/glpi-project/glpi/pull/4734

orthagh avatar Oct 03 '18 13:10 orthagh