mirror of
https://github.com/wekan/wekan.git
synced 2026-11-26 20:45:07 -05:00
Keep the first actual observation of each UTC day, preserve unknown estimates, and bound history reads. Verify retry and concurrent capture behavior with MongoDB and reader permissions with Chromium. Thanks to xet7 !
15 lines
663 B
JavaScript
15 lines
663 B
JavaScript
import { Meteor } from 'meteor/meteor';
|
|
import { Mongo } from 'meteor/mongo';
|
|
|
|
// Private report observations, not editable planning records or an undo stack.
|
|
// Report readers must apply the same card visibility as sprint snapshots.
|
|
const ScrumDailySnapshots = new Mongo.Collection('scrumDailySnapshots');
|
|
if (Meteor.isServer) {
|
|
ScrumDailySnapshots.deny({ insert: () => true, update: () => true, remove: () => true });
|
|
const { ensureIndex } = require('/server/lib/mongoStartup');
|
|
Meteor.startup(async () => {
|
|
await ensureIndex(ScrumDailySnapshots, { boardId: 1, sprintId: 1, startedAt: 1, capturedAt: -1 });
|
|
});
|
|
}
|
|
export default ScrumDailySnapshots;
|