Merge branch 'hotfix/4.7.3.1' into develop

This commit is contained in:
James Cole 2018-05-14 19:24:54 +02:00
commit a9c8c8384d
2 changed files with 6 additions and 1 deletions

View File

@ -536,6 +536,7 @@ class RuleController extends Controller
'title' => trans('firefly.default_rule_name'),
'description' => trans('firefly.default_rule_description'),
'trigger' => 'store-journal',
'strict' => true,
'rule-trigger-values' => [
trans('firefly.default_rule_trigger_description'),
trans('firefly.default_rule_trigger_from_account'),

View File

@ -31,6 +31,7 @@ use FireflyIII\TransactionRules\Actions\ActionInterface;
use FireflyIII\TransactionRules\Factory\ActionFactory;
use FireflyIII\TransactionRules\Factory\TriggerFactory;
use FireflyIII\TransactionRules\Triggers\AbstractTrigger;
use FireflyIII\TransactionRules\Triggers\UserAction;
use Illuminate\Support\Collection;
use Log;
@ -279,11 +280,14 @@ final class Processor
Log::debug('Is a match!');
++$hitTriggers;
// is non-strict? then return true!
if (!$this->strict) {
if (!$this->strict && UserAction::class !== \get_class($trigger)) {
Log::debug('Rule is set as non-strict, return true!');
return true;
}
if (!$this->strict && UserAction::class === \get_class($trigger)) {
Log::debug('Rule is set as non-strict, but action was "user-action". Will not return true.');
}
}
if ($trigger->stopProcessing) {
Log::debug('Stop processing this trigger and break.');