Files
wekan/models/lib/copiedComment.js
T
Lauri Ojansivu 8dff96d7b3 Preserve copied comment history
Keep each copied comment's original author and timestamps, re-home it without mutating the cached source, and avoid generating false new-comment activity. Add positive, negative, wiring, and REST browser regressions.

Thanks to ocdtrekkie, 2martens, frmwrk123 and xet7 !

Fixes #1213,
2026-08-25 17:57:13 +03:00

11 lines
284 B
JavaScript

'use strict';
function buildCopiedComment(comment, newCardId, newBoardId) {
if (!comment || !newCardId || !newBoardId) return null;
const copy = { ...comment, cardId: newCardId, boardId: newBoardId };
delete copy._id;
return copy;
}
module.exports = { buildCopiedComment };