1
0
Fork 0
mirror of https://github.com/plankanban/planka.git synced 2025-07-24 15:49:46 +02:00

feat: Log actions when task completion status changes

This commit is contained in:
Maksim Eltyshev 2025-05-20 21:17:51 +02:00
parent 5d53f44fe8
commit d5fd2fd33b
6 changed files with 64 additions and 0 deletions

View file

@ -132,6 +132,22 @@ module.exports = {
}),
user: inputs.actorUser,
});
if (inputs.record.isCompleted !== task.isCompleted) {
await sails.helpers.actions.createOne.with({
values: {
type: task.isCompleted ? Action.Types.COMPLETE_TASK : Action.Types.UNCOMPLETE_TASK,
data: {
task: _.pick(task, ['id', 'name']),
},
user: inputs.actorUser,
card: inputs.card,
},
project: inputs.project,
board: inputs.board,
list: inputs.list,
});
}
}
return task;