mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-16 01:06:46 +00:00
Expand search.
This commit is contained in:
@@ -57,6 +57,10 @@ class AddTag implements ActionInterface
|
||||
/** @var TagFactory $factory */
|
||||
$factory = app(TagFactory::class);
|
||||
$factory->setUser($journal->user);
|
||||
|
||||
// TODO explode value on comma?
|
||||
|
||||
|
||||
$tag = $factory->findOrCreate($this->action->action_value);
|
||||
|
||||
if (null === $tag) {
|
||||
|
@@ -84,7 +84,10 @@ class SetCategory implements ActionInterface
|
||||
$user = User::find($journal['user_id']);
|
||||
$search = $this->action->action_value;
|
||||
|
||||
$category = $user->categories()->where('name', $search)->first();
|
||||
/** @var CategoryFactory $factory */
|
||||
$factory = app(CategoryFactory::class);
|
||||
$factory->setUser($user);
|
||||
$category = $factory->findOrCreate(null, $search);
|
||||
if (null === $category) {
|
||||
Log::debug(sprintf('RuleAction SetCategory could not set category of journal #%d to "%s" because no such category exists.', $journal['transaction_journal_id'], $search));
|
||||
|
||||
|
Reference in New Issue
Block a user