From 027fac90b4d2b78e4a41536267cd463a0e006d11 Mon Sep 17 00:00:00 2001
From: Scott Anderson <662325+scottanderson@users.noreply.github.com>
Date: Thu, 4 Jun 2026 01:40:00 -0400
Subject: [PATCH 1/2] fix: Set assignee bug
---
src/views/ChoreEdit/ChoreEdit.jsx | 13 +++++--------
1 file changed, 5 insertions(+), 8 deletions(-)
diff --git a/src/views/ChoreEdit/ChoreEdit.jsx b/src/views/ChoreEdit/ChoreEdit.jsx
index 8dcf06b8..a4f1c3a1 100644
--- a/src/views/ChoreEdit/ChoreEdit.jsx
+++ b/src/views/ChoreEdit/ChoreEdit.jsx
@@ -580,7 +580,9 @@ const ChoreEdit = () => {
setAssignStrategy('no_assignee')
setAssignedTo(null)
} else if (assignees.length === 1) {
- setAssignedTo(assignees[0].userId)
+ if (!assignees.some(a => a.userId === assignedTo)) {
+ setAssignedTo(assignees[0].userId)
+ }
if (assignStrategy === 'no_assignee') {
setAssignStrategy(ASSIGN_STRATEGIES[2]) // default to least_completed
}
@@ -1014,17 +1016,12 @@ const ChoreEdit = () => {
}
disabled={assignees.length === 0}
value={assignedTo > -1 ? assignedTo : null}
+ onChange={(_, newValue) => setAssignedTo(newValue)}
>
{performers
?.filter(p => assignees.find(a => a.userId == p.userId))
.map((item, index) => (
-
))}
From b2eeeeddfbec76c7fc6b86fc26ccab5b71cfb02a Mon Sep 17 00:00:00 2001
From: Scott Anderson <662325+scottanderson@users.noreply.github.com>
Date: Sat, 6 Jun 2026 20:06:42 -0400
Subject: [PATCH 2/2] cleanup
---
src/views/ChoreEdit/ChoreEdit.jsx | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/views/ChoreEdit/ChoreEdit.jsx b/src/views/ChoreEdit/ChoreEdit.jsx
index a4f1c3a1..26fe6016 100644
--- a/src/views/ChoreEdit/ChoreEdit.jsx
+++ b/src/views/ChoreEdit/ChoreEdit.jsx
@@ -579,7 +579,7 @@ const ChoreEdit = () => {
if (assignees.length === 0) {
setAssignStrategy('no_assignee')
setAssignedTo(null)
- } else if (assignees.length === 1) {
+ } else {
if (!assignees.some(a => a.userId === assignedTo)) {
setAssignedTo(assignees[0].userId)
}
@@ -1016,10 +1016,10 @@ const ChoreEdit = () => {
}
disabled={assignees.length === 0}
value={assignedTo > -1 ? assignedTo : null}
- onChange={(_, newValue) => setAssignedTo(newValue)}
+ onChange={(_, selectedUserId) => setAssignedTo(selectedUserId)}
>
{performers
- ?.filter(p => assignees.find(a => a.userId == p.userId))
+ ?.filter(p => assignees.some(a => a.userId == p.userId))
.map((item, index) => (