mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2024-11-22 17:06:39 -06:00
Merge branch 'hotfix/4.7.3.1' into develop
This commit is contained in:
commit
a9c8c8384d
@ -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'),
|
||||
|
@ -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.');
|
||||
|
Loading…
Reference in New Issue
Block a user