Skip to content

A local-first personal finance app

:bug: (reports) fix conditionsOp not applying for saved reports (#4652)

Matiss Janis Aboltins999010cca666
diff --git a/packages/desktop-client/src/components/reports/reports/CustomReport.tsx b/packages/desktop-client/src/components/reports/reports/CustomReport.tsx
index b34f6d15f4..1a6ba3526a 100644
--- a/packages/desktop-client/src/components/reports/reports/CustomReport.tsx
+++ b/packages/desktop-client/src/components/reports/reports/CustomReport.tsx
@@ -273,6 +273,7 @@ function CustomReportInner({ report: initialReport }: CustomReportInnerProps) {
report.conditions?.forEach((condition: RuleConditionEntity) =>
onApplyFilter(condition),
);
+ onConditionsOpChange(report.conditionsOp);
const trans = await send('get-earliest-transaction');
setEarliestTransaction(trans ? trans.date : monthUtils.currentDay());
const fromDate =
@@ -346,7 +347,9 @@ function CustomReportInner({ report: initialReport }: CustomReportInnerProps) {
firstDayOfWeekIdx,
isDateStatic,
onApplyFilter,
+ onConditionsOpChange,
report.conditions,
+ report.conditionsOp,
includeCurrentInterval,
locale,
]);
diff --git a/upcoming-release-notes/4652.md b/upcoming-release-notes/4652.md
new file mode 100644
index 0000000000..90fddb5851
--- /dev/null
+++ b/upcoming-release-notes/4652.md
@@ -0,0 +1,6 @@
+---
+category: Bugfix
+authors: [MatissJanis]
+---
+
+Reports: fix "any" condition not initially saving for custom reports.