Yetiforcecrm: Filter conditions: combination of ALL and ANY not possible?

Created on 6 Sep 2017  ·  2Comments  ·  Source: YetiForceCompany/YetiForceCRM

Issue


It seems as if the conditions are ignored if there are 'All conditions' and 'Any conditions' defined.

Actual Behavior


All conditions are ignored if both types are set.

Expected Behavior


'All conditions' should be combined with 'Any conditions' ('All' = true AND 'Any' = true).

How to trigger the error

  1. Create a filter with both condition types.
    combined-conditions
  1. Have records that satisfy the conditions and ones that don't in order to be able to tell whether the filter works or not.
    all-tickets

  2. Select the new filter.
    combined-conditions-results

Your Environment

  • YetiForce Version used: 4.1.0
  • Browser name and version: Firefox 55.0.3 / Chrome 60.0.3112.113
  • Environment name and version: Zend Engine v2.6.0 | PHP 5.6.30
  • Operating System and version: Ubuntu 16.04.2 LTS
❕ priority 🐛 bug

Most helpful comment

change this line with:

$this->query->andWhere(['and', array_merge(['and'], $this->conditionsAnd), array_merge(['or'], $this->conditionsOr)]);

All 2 comments

change this line with:

$this->query->andWhere(['and', array_merge(['and'], $this->conditionsAnd), array_merge(['or'], $this->conditionsOr)]);

thanks, solved this issue.

Was this page helpful?
0 / 5 - 0 ratings