Skip to content

Commit

Permalink
Merge pull request #2020 from Real-Dev-Squad/fix/orphan-tasks-staging
Browse files Browse the repository at this point in the history
Fix: orphan tasks bug in staging.
  • Loading branch information
lakshayman committed Apr 22, 2024
2 parents 32b3e35 + f8ca44c commit 1f4d942
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion models/tasks.js
Original file line number Diff line number Diff line change
Expand Up @@ -683,7 +683,7 @@ const markUnDoneTasksOfArchivedUsersBacklog = async (users) => {
const batch = firestore.batch();
for (const user of users) {
const tasksQuerySnapshot = await tasksModel
.where("assigneeId", "==", user.id)
.where("assignee", "==", user.id)
.where("status", "not-in", [COMPLETED, DONE, BACKLOG])
.get();
tasksQuerySnapshot.forEach(async (taskDoc) => {
Expand Down
6 changes: 3 additions & 3 deletions test/integration/external-accounts.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -312,15 +312,15 @@ describe("External Accounts", function () {

const userId = usersFromRds[4].id;
const task1 = {
assigneeId: userId,
assignee: userId,
status: "ACTIVE",
};
const task2 = {
assigneeId: userId,
assignee: userId,
status: "COMPLETED",
};
const task3 = {
assigneeId: userId,
assignee: userId,
status: "IN_PROGRESS",
};
await Promise.all([tasksModel.add(task1), tasksModel.add(task2), tasksModel.add(task3)]);
Expand Down

0 comments on commit 1f4d942

Please sign in to comment.