Files
wekan/server/publications/scrum.js
T
Lauri Ojansivu 83eac10211 Add Scrum sprint planning, optional metadata and snapshot reports
Reuse board permissions, card estimates and chart exports for Product Backlog, Sprints, Sprint Report and Velocity views. Add revision-checked sprint lifecycle, recoverable rollover, release/event creation and independently hidden metadata controls. Explicitly label assigned-only reports as partial.

Verified 12 focused Node checks, a real Meteor/Mongo lifecycle regression and three Chromium scenarios including settings visibility, denial paths and actual Excel/PDF files. History integration, full transfer mappings and further report/editor work remain tracked in the Scrum design.

Thanks to xet7 !
2026-09-27 17:33:38 +03:00

23 lines
857 B
JavaScript

import { Meteor } from 'meteor/meteor';
import { check } from 'meteor/check';
import { getScrumBoardData } from '/server/scrum';
// One-shot, permission-filtered snapshot, like the getBoardData method. Consumers
// explicitly refresh after edits; no live cursor can outlive its authorization.
Meteor.publish('boardScrum', async function(boardId) {
check(boardId, String);
try {
const data = await getScrumBoardData(this.userId, boardId);
for (const [collection, records] of [['scrumSprints', data.sprints], ['scrumReleases', data.releases], ['scrumEvents', data.events]]) {
for (const record of records) {
const { _id, ...fields } = record;
this.added(collection, _id, fields);
}
}
this.ready();
} catch (error) {
if (error.error === 'not-authorized') this.ready();
else this.error(error);
}
});