Skip to content

A local-first personal finance app

make bulk notes prepend/append behaviour consistent with rules (#5464)

Matt Fiddaman186d417c6ec2
diff --git a/packages/desktop-client/src/hooks/useTransactionBatchActions.ts b/packages/desktop-client/src/hooks/useTransactionBatchActions.ts
index 49477c1f6e..dedeb016c6 100644
--- a/packages/desktop-client/src/hooks/useTransactionBatchActions.ts
+++ b/packages/desktop-client/src/hooks/useTransactionBatchActions.ts
@@ -108,10 +108,10 @@ export function useTransactionBatchActions() {
if (name === 'notes') {
if (mode === 'prepend') {
valueToSet =
- trans.notes === null ? value : value + ' ' + trans.notes;
+ trans.notes === null ? value : `${value}${trans.notes}`;
} else if (mode === 'append') {
valueToSet =
- trans.notes === null ? value : trans.notes + ' ' + value;
+ trans.notes === null ? value : `${trans.notes}${value}`;
} else if (mode === 'replace') {
valueToSet = value;
}
diff --git a/upcoming-release-notes/5464.md b/upcoming-release-notes/5464.md
new file mode 100644
index 0000000000..207a335e76
--- /dev/null
+++ b/upcoming-release-notes/5464.md
@@ -0,0 +1,6 @@
+---
+category: Bugfix
+authors: [matt-fidd]
+---
+
+Remove the automatic space added by bulk prepend/append to notes to make behaviour consistent with the rule action