Compare commits

..

6 Commits

Author SHA1 Message Date
github-actions[bot]
847800f81f Merge pull request #11851 from firefly-iii/release-1772469975
🤖 Automatically merge the PR into the develop branch.
2026-03-02 17:46:23 +01:00
JC5
b1e6f6b264 🤖 Auto commit for release 'develop' on 2026-03-02 2026-03-02 17:46:15 +01:00
github-actions[bot]
91d282c9cf Merge pull request #11850 from firefly-iii/release-1772423452
🤖 Automatically merge the PR into the develop branch.
2026-03-02 04:51:03 +01:00
JC5
c53ed44ea3 🤖 Auto commit for release 'develop' on 2026-03-02 2026-03-02 04:50:53 +01:00
James Cole
70b12354e8 Fix https://github.com/firefly-iii/firefly-iii/issues/11847 2026-03-01 20:11:33 +01:00
James Cole
6e8d204f00 Fix rule actions checking for renamed accounts. 2026-03-01 19:55:48 +01:00
6 changed files with 26 additions and 8 deletions

View File

@@ -778,9 +778,10 @@ class GroupCollector implements GroupCollectorInterface
{
$newArray = $newJournal->toArray();
if (array_key_exists('attachment_id', $newArray)) {
$attachmentId = (int) $newJournal['attachment_id'];
$existingJournal['attachments'][$attachmentId] = ['id' => $attachmentId];
$attachmentId = (int) $newJournal['attachment_id'];
if (0 !== $attachmentId) {
$existingJournal['attachments'][$attachmentId] = ['id' => $attachmentId];
}
}
return $existingJournal;

View File

@@ -246,12 +246,17 @@ class TagController extends Controller
/** @var GroupCollectorInterface $collector */
$collector = app(GroupCollectorInterface::class);
// collect transaction journal IDs in repository,
// this makes the collector faster and more accurate.
$journalIds = $this->repository->getJournalIds($tag);
$collector
->setRange($start, $end)
->setLimit($pageSize)
->setPage($page)
->setJournalIds($journalIds)
->withAccountInformation()
->setTag($tag)
// ->setTag($tag)
->withBudgetInformation()
->withCategoryInformation()
->withAttachmentInformation()
@@ -296,6 +301,10 @@ class TagController extends Controller
$path = route('tags.show', [$tag->id, 'all']);
$location = $this->repository->getLocation($tag);
// collect transaction journal IDs in repository,
// this makes the collector faster and more accurate.
$journalIds = $this->repository->getJournalIds($tag);
/** @var GroupCollectorInterface $collector */
$collector = app(GroupCollectorInterface::class);
$collector
@@ -303,7 +312,7 @@ class TagController extends Controller
->setLimit($pageSize)
->setPage($page)
->withAccountInformation()
->setTag($tag)
->setJournalIds($journalIds)
->withBudgetInformation()
->withCategoryInformation()
->withAttachmentInformation()

View File

@@ -51,7 +51,7 @@ class UpdatesAccountInformation implements ShouldQueue
private function correctRuleActions(Account $account, array $oldData, Rule $rule): void
{
$fields = ['set_source_account', 'set_destination_account'];
$fields = ['set_source_account', 'set_destination_account', 'convert_withdrawal', 'convert_deposit', 'convert_transfer'];
Log::debug(sprintf('Check if rule #%d actions reference account #%d "%s"', $rule->id, $account->id, $account->name));
$fixed = 0;

View File

@@ -135,6 +135,12 @@ class TagRepository implements TagRepositoryInterface, UserGroupInterface
});
}
#[Override]
public function getJournalIds(Tag $tag): array
{
return $tag->transactionJournals->pluck('id')->toArray();
}
public function getLocation(Tag $tag): ?Location
{
/** @var null|Location */

View File

@@ -71,6 +71,8 @@ interface TagRepositoryInterface
public function getAttachments(Tag $tag): Collection;
public function getJournalIds(Tag $tag): array;
/**
* Return location, or NULL.
*/

View File

@@ -78,8 +78,8 @@ return [
'running_balance_column' => (bool)envNonEmpty('USE_RUNNING_BALANCE', true), // this is only the default value, is not used.
// see cer.php for exchange rates feature flag.
],
'version' => 'develop/2026-03-01',
'build_time' => 1772370892,
'version' => 'develop/2026-03-02',
'build_time' => 1772469853,
'api_version' => '2.1.0', // field is no longer used.
'db_version' => 28, // field is no longer used.