mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-16 22:27:26 +01:00
Added note sync when user adds task to challenge, tests, and fixed challenge tests (#8200)
This commit is contained in:
committed by
Matteo Pagliazzi
parent
13df60e0dd
commit
cbe1892b50
@@ -157,6 +157,7 @@ async function _addTaskFn (challenge, tasks, memberId) {
|
||||
let userTask = new Tasks[chalTask.type](Tasks.Task.sanitize(syncableAttrs(chalTask)));
|
||||
userTask.challenge = {taskId: chalTask._id, id: challenge._id};
|
||||
userTask.userId = memberId;
|
||||
userTask.notes = chalTask.notes; // We want to sync the notes when the task is first added to the challenge
|
||||
|
||||
let tasksOrderList = updateTasksOrderQ.$push[`tasksOrder.${chalTask.type}s`];
|
||||
if (!tasksOrderList) {
|
||||
|
||||
Reference in New Issue
Block a user