2025-10-16 20:23:05 +03:00
|
|
|
import { Meteor } from 'meteor/meteor';
|
|
|
|
|
import { check } from 'meteor/check';
|
|
|
|
|
import PositionHistory from '/models/positionHistory';
|
|
|
|
|
import Swimlanes from '/models/swimlanes';
|
|
|
|
|
import Lists from '/models/lists';
|
|
|
|
|
import Cards from '/models/cards';
|
2026-01-18 19:29:58 +02:00
|
|
|
import { ReactiveCache } from '/imports/reactiveCache';
|
2025-10-16 20:23:05 +03:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Server-side methods for position history tracking
|
|
|
|
|
*/
|
|
|
|
|
Meteor.methods({
|
|
|
|
|
/**
|
|
|
|
|
* Track original position for a swimlane
|
|
|
|
|
*/
|
Update ReactiveCache call sites to use async/await for Meteor 3.0
Part 3 of ReactiveCache async migration:
- Add await before all ReactiveCache.getX() calls
- Make functions containing ReactiveCache calls async
- Convert forEach/map/filter loops with async callbacks to for...of
- Update model helpers, Meteor methods, JsonRoutes handlers
- Update collection hooks (.before/.after insert/update/remove)
- Update .allow() callbacks to async
Files updated across models/ and server/ directories:
- Model files: cards, boards, lists, swimlanes, activities, users,
checklists, checklistItems, customFields, attachments, integrations,
cardComments, settings files, creators, exporters, and more
- Server files: publications, methods, notifications, routes, migrations
2026-02-01 00:54:38 +02:00
|
|
|
async 'positionHistory.trackSwimlane'(swimlaneId) {
|
2025-10-16 20:23:05 +03:00
|
|
|
check(swimlaneId, String);
|
Update ReactiveCache call sites to use async/await for Meteor 3.0
Part 3 of ReactiveCache async migration:
- Add await before all ReactiveCache.getX() calls
- Make functions containing ReactiveCache calls async
- Convert forEach/map/filter loops with async callbacks to for...of
- Update model helpers, Meteor methods, JsonRoutes handlers
- Update collection hooks (.before/.after insert/update/remove)
- Update .allow() callbacks to async
Files updated across models/ and server/ directories:
- Model files: cards, boards, lists, swimlanes, activities, users,
checklists, checklistItems, customFields, attachments, integrations,
cardComments, settings files, creators, exporters, and more
- Server files: publications, methods, notifications, routes, migrations
2026-02-01 00:54:38 +02:00
|
|
|
|
2026-01-18 19:29:58 +02:00
|
|
|
if (!this.userId) {
|
|
|
|
|
throw new Meteor.Error('not-authorized', 'You must be logged in.');
|
|
|
|
|
}
|
Update ReactiveCache call sites to use async/await for Meteor 3.0
Part 3 of ReactiveCache async migration:
- Add await before all ReactiveCache.getX() calls
- Make functions containing ReactiveCache calls async
- Convert forEach/map/filter loops with async callbacks to for...of
- Update model helpers, Meteor methods, JsonRoutes handlers
- Update collection hooks (.before/.after insert/update/remove)
- Update .allow() callbacks to async
Files updated across models/ and server/ directories:
- Model files: cards, boards, lists, swimlanes, activities, users,
checklists, checklistItems, customFields, attachments, integrations,
cardComments, settings files, creators, exporters, and more
- Server files: publications, methods, notifications, routes, migrations
2026-02-01 00:54:38 +02:00
|
|
|
|
2026-02-18 18:24:55 +02:00
|
|
|
const swimlane = await Swimlanes.findOneAsync(swimlaneId);
|
2025-10-16 20:23:05 +03:00
|
|
|
if (!swimlane) {
|
|
|
|
|
throw new Meteor.Error('swimlane-not-found', 'Swimlane not found');
|
|
|
|
|
}
|
Update ReactiveCache call sites to use async/await for Meteor 3.0
Part 3 of ReactiveCache async migration:
- Add await before all ReactiveCache.getX() calls
- Make functions containing ReactiveCache calls async
- Convert forEach/map/filter loops with async callbacks to for...of
- Update model helpers, Meteor methods, JsonRoutes handlers
- Update collection hooks (.before/.after insert/update/remove)
- Update .allow() callbacks to async
Files updated across models/ and server/ directories:
- Model files: cards, boards, lists, swimlanes, activities, users,
checklists, checklistItems, customFields, attachments, integrations,
cardComments, settings files, creators, exporters, and more
- Server files: publications, methods, notifications, routes, migrations
2026-02-01 00:54:38 +02:00
|
|
|
|
|
|
|
|
const board = await ReactiveCache.getBoard(swimlane.boardId);
|
2026-01-18 19:29:58 +02:00
|
|
|
if (!board || !board.isVisibleBy({ _id: this.userId })) {
|
|
|
|
|
throw new Meteor.Error('not-authorized', 'You do not have access to this board.');
|
|
|
|
|
}
|
Update ReactiveCache call sites to use async/await for Meteor 3.0
Part 3 of ReactiveCache async migration:
- Add await before all ReactiveCache.getX() calls
- Make functions containing ReactiveCache calls async
- Convert forEach/map/filter loops with async callbacks to for...of
- Update model helpers, Meteor methods, JsonRoutes handlers
- Update collection hooks (.before/.after insert/update/remove)
- Update .allow() callbacks to async
Files updated across models/ and server/ directories:
- Model files: cards, boards, lists, swimlanes, activities, users,
checklists, checklistItems, customFields, attachments, integrations,
cardComments, settings files, creators, exporters, and more
- Server files: publications, methods, notifications, routes, migrations
2026-02-01 00:54:38 +02:00
|
|
|
|
2025-10-16 20:23:05 +03:00
|
|
|
return swimlane.trackOriginalPosition();
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Track original position for a list
|
|
|
|
|
*/
|
Update ReactiveCache call sites to use async/await for Meteor 3.0
Part 3 of ReactiveCache async migration:
- Add await before all ReactiveCache.getX() calls
- Make functions containing ReactiveCache calls async
- Convert forEach/map/filter loops with async callbacks to for...of
- Update model helpers, Meteor methods, JsonRoutes handlers
- Update collection hooks (.before/.after insert/update/remove)
- Update .allow() callbacks to async
Files updated across models/ and server/ directories:
- Model files: cards, boards, lists, swimlanes, activities, users,
checklists, checklistItems, customFields, attachments, integrations,
cardComments, settings files, creators, exporters, and more
- Server files: publications, methods, notifications, routes, migrations
2026-02-01 00:54:38 +02:00
|
|
|
async 'positionHistory.trackList'(listId) {
|
2025-10-16 20:23:05 +03:00
|
|
|
check(listId, String);
|
Update ReactiveCache call sites to use async/await for Meteor 3.0
Part 3 of ReactiveCache async migration:
- Add await before all ReactiveCache.getX() calls
- Make functions containing ReactiveCache calls async
- Convert forEach/map/filter loops with async callbacks to for...of
- Update model helpers, Meteor methods, JsonRoutes handlers
- Update collection hooks (.before/.after insert/update/remove)
- Update .allow() callbacks to async
Files updated across models/ and server/ directories:
- Model files: cards, boards, lists, swimlanes, activities, users,
checklists, checklistItems, customFields, attachments, integrations,
cardComments, settings files, creators, exporters, and more
- Server files: publications, methods, notifications, routes, migrations
2026-02-01 00:54:38 +02:00
|
|
|
|
2026-01-18 19:29:58 +02:00
|
|
|
if (!this.userId) {
|
|
|
|
|
throw new Meteor.Error('not-authorized', 'You must be logged in.');
|
|
|
|
|
}
|
Update ReactiveCache call sites to use async/await for Meteor 3.0
Part 3 of ReactiveCache async migration:
- Add await before all ReactiveCache.getX() calls
- Make functions containing ReactiveCache calls async
- Convert forEach/map/filter loops with async callbacks to for...of
- Update model helpers, Meteor methods, JsonRoutes handlers
- Update collection hooks (.before/.after insert/update/remove)
- Update .allow() callbacks to async
Files updated across models/ and server/ directories:
- Model files: cards, boards, lists, swimlanes, activities, users,
checklists, checklistItems, customFields, attachments, integrations,
cardComments, settings files, creators, exporters, and more
- Server files: publications, methods, notifications, routes, migrations
2026-02-01 00:54:38 +02:00
|
|
|
|
2026-02-18 18:24:55 +02:00
|
|
|
const list = await Lists.findOneAsync(listId);
|
2025-10-16 20:23:05 +03:00
|
|
|
if (!list) {
|
|
|
|
|
throw new Meteor.Error('list-not-found', 'List not found');
|
|
|
|
|
}
|
Update ReactiveCache call sites to use async/await for Meteor 3.0
Part 3 of ReactiveCache async migration:
- Add await before all ReactiveCache.getX() calls
- Make functions containing ReactiveCache calls async
- Convert forEach/map/filter loops with async callbacks to for...of
- Update model helpers, Meteor methods, JsonRoutes handlers
- Update collection hooks (.before/.after insert/update/remove)
- Update .allow() callbacks to async
Files updated across models/ and server/ directories:
- Model files: cards, boards, lists, swimlanes, activities, users,
checklists, checklistItems, customFields, attachments, integrations,
cardComments, settings files, creators, exporters, and more
- Server files: publications, methods, notifications, routes, migrations
2026-02-01 00:54:38 +02:00
|
|
|
|
|
|
|
|
const board = await ReactiveCache.getBoard(list.boardId);
|
2026-01-18 19:29:58 +02:00
|
|
|
if (!board || !board.isVisibleBy({ _id: this.userId })) {
|
|
|
|
|
throw new Meteor.Error('not-authorized', 'You do not have access to this board.');
|
|
|
|
|
}
|
Update ReactiveCache call sites to use async/await for Meteor 3.0
Part 3 of ReactiveCache async migration:
- Add await before all ReactiveCache.getX() calls
- Make functions containing ReactiveCache calls async
- Convert forEach/map/filter loops with async callbacks to for...of
- Update model helpers, Meteor methods, JsonRoutes handlers
- Update collection hooks (.before/.after insert/update/remove)
- Update .allow() callbacks to async
Files updated across models/ and server/ directories:
- Model files: cards, boards, lists, swimlanes, activities, users,
checklists, checklistItems, customFields, attachments, integrations,
cardComments, settings files, creators, exporters, and more
- Server files: publications, methods, notifications, routes, migrations
2026-02-01 00:54:38 +02:00
|
|
|
|
2025-10-16 20:23:05 +03:00
|
|
|
return list.trackOriginalPosition();
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Track original position for a card
|
|
|
|
|
*/
|
Update ReactiveCache call sites to use async/await for Meteor 3.0
Part 3 of ReactiveCache async migration:
- Add await before all ReactiveCache.getX() calls
- Make functions containing ReactiveCache calls async
- Convert forEach/map/filter loops with async callbacks to for...of
- Update model helpers, Meteor methods, JsonRoutes handlers
- Update collection hooks (.before/.after insert/update/remove)
- Update .allow() callbacks to async
Files updated across models/ and server/ directories:
- Model files: cards, boards, lists, swimlanes, activities, users,
checklists, checklistItems, customFields, attachments, integrations,
cardComments, settings files, creators, exporters, and more
- Server files: publications, methods, notifications, routes, migrations
2026-02-01 00:54:38 +02:00
|
|
|
async 'positionHistory.trackCard'(cardId) {
|
2025-10-16 20:23:05 +03:00
|
|
|
check(cardId, String);
|
Update ReactiveCache call sites to use async/await for Meteor 3.0
Part 3 of ReactiveCache async migration:
- Add await before all ReactiveCache.getX() calls
- Make functions containing ReactiveCache calls async
- Convert forEach/map/filter loops with async callbacks to for...of
- Update model helpers, Meteor methods, JsonRoutes handlers
- Update collection hooks (.before/.after insert/update/remove)
- Update .allow() callbacks to async
Files updated across models/ and server/ directories:
- Model files: cards, boards, lists, swimlanes, activities, users,
checklists, checklistItems, customFields, attachments, integrations,
cardComments, settings files, creators, exporters, and more
- Server files: publications, methods, notifications, routes, migrations
2026-02-01 00:54:38 +02:00
|
|
|
|
2026-01-18 19:29:58 +02:00
|
|
|
if (!this.userId) {
|
|
|
|
|
throw new Meteor.Error('not-authorized', 'You must be logged in.');
|
|
|
|
|
}
|
Update ReactiveCache call sites to use async/await for Meteor 3.0
Part 3 of ReactiveCache async migration:
- Add await before all ReactiveCache.getX() calls
- Make functions containing ReactiveCache calls async
- Convert forEach/map/filter loops with async callbacks to for...of
- Update model helpers, Meteor methods, JsonRoutes handlers
- Update collection hooks (.before/.after insert/update/remove)
- Update .allow() callbacks to async
Files updated across models/ and server/ directories:
- Model files: cards, boards, lists, swimlanes, activities, users,
checklists, checklistItems, customFields, attachments, integrations,
cardComments, settings files, creators, exporters, and more
- Server files: publications, methods, notifications, routes, migrations
2026-02-01 00:54:38 +02:00
|
|
|
|
2026-02-18 18:24:55 +02:00
|
|
|
const card = await Cards.findOneAsync(cardId);
|
2025-10-16 20:23:05 +03:00
|
|
|
if (!card) {
|
|
|
|
|
throw new Meteor.Error('card-not-found', 'Card not found');
|
|
|
|
|
}
|
Update ReactiveCache call sites to use async/await for Meteor 3.0
Part 3 of ReactiveCache async migration:
- Add await before all ReactiveCache.getX() calls
- Make functions containing ReactiveCache calls async
- Convert forEach/map/filter loops with async callbacks to for...of
- Update model helpers, Meteor methods, JsonRoutes handlers
- Update collection hooks (.before/.after insert/update/remove)
- Update .allow() callbacks to async
Files updated across models/ and server/ directories:
- Model files: cards, boards, lists, swimlanes, activities, users,
checklists, checklistItems, customFields, attachments, integrations,
cardComments, settings files, creators, exporters, and more
- Server files: publications, methods, notifications, routes, migrations
2026-02-01 00:54:38 +02:00
|
|
|
|
|
|
|
|
const board = await ReactiveCache.getBoard(card.boardId);
|
2026-01-18 19:29:58 +02:00
|
|
|
if (!board || !board.isVisibleBy({ _id: this.userId })) {
|
|
|
|
|
throw new Meteor.Error('not-authorized', 'You do not have access to this board.');
|
|
|
|
|
}
|
Update ReactiveCache call sites to use async/await for Meteor 3.0
Part 3 of ReactiveCache async migration:
- Add await before all ReactiveCache.getX() calls
- Make functions containing ReactiveCache calls async
- Convert forEach/map/filter loops with async callbacks to for...of
- Update model helpers, Meteor methods, JsonRoutes handlers
- Update collection hooks (.before/.after insert/update/remove)
- Update .allow() callbacks to async
Files updated across models/ and server/ directories:
- Model files: cards, boards, lists, swimlanes, activities, users,
checklists, checklistItems, customFields, attachments, integrations,
cardComments, settings files, creators, exporters, and more
- Server files: publications, methods, notifications, routes, migrations
2026-02-01 00:54:38 +02:00
|
|
|
|
2025-10-16 20:23:05 +03:00
|
|
|
return card.trackOriginalPosition();
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get original position for a swimlane
|
|
|
|
|
*/
|
Update ReactiveCache call sites to use async/await for Meteor 3.0
Part 3 of ReactiveCache async migration:
- Add await before all ReactiveCache.getX() calls
- Make functions containing ReactiveCache calls async
- Convert forEach/map/filter loops with async callbacks to for...of
- Update model helpers, Meteor methods, JsonRoutes handlers
- Update collection hooks (.before/.after insert/update/remove)
- Update .allow() callbacks to async
Files updated across models/ and server/ directories:
- Model files: cards, boards, lists, swimlanes, activities, users,
checklists, checklistItems, customFields, attachments, integrations,
cardComments, settings files, creators, exporters, and more
- Server files: publications, methods, notifications, routes, migrations
2026-02-01 00:54:38 +02:00
|
|
|
async 'positionHistory.getSwimlaneOriginalPosition'(swimlaneId) {
|
2025-10-16 20:23:05 +03:00
|
|
|
check(swimlaneId, String);
|
Update ReactiveCache call sites to use async/await for Meteor 3.0
Part 3 of ReactiveCache async migration:
- Add await before all ReactiveCache.getX() calls
- Make functions containing ReactiveCache calls async
- Convert forEach/map/filter loops with async callbacks to for...of
- Update model helpers, Meteor methods, JsonRoutes handlers
- Update collection hooks (.before/.after insert/update/remove)
- Update .allow() callbacks to async
Files updated across models/ and server/ directories:
- Model files: cards, boards, lists, swimlanes, activities, users,
checklists, checklistItems, customFields, attachments, integrations,
cardComments, settings files, creators, exporters, and more
- Server files: publications, methods, notifications, routes, migrations
2026-02-01 00:54:38 +02:00
|
|
|
|
2026-01-18 19:29:58 +02:00
|
|
|
if (!this.userId) {
|
|
|
|
|
throw new Meteor.Error('not-authorized', 'You must be logged in.');
|
|
|
|
|
}
|
Update ReactiveCache call sites to use async/await for Meteor 3.0
Part 3 of ReactiveCache async migration:
- Add await before all ReactiveCache.getX() calls
- Make functions containing ReactiveCache calls async
- Convert forEach/map/filter loops with async callbacks to for...of
- Update model helpers, Meteor methods, JsonRoutes handlers
- Update collection hooks (.before/.after insert/update/remove)
- Update .allow() callbacks to async
Files updated across models/ and server/ directories:
- Model files: cards, boards, lists, swimlanes, activities, users,
checklists, checklistItems, customFields, attachments, integrations,
cardComments, settings files, creators, exporters, and more
- Server files: publications, methods, notifications, routes, migrations
2026-02-01 00:54:38 +02:00
|
|
|
|
2026-02-18 18:24:55 +02:00
|
|
|
const swimlane = await Swimlanes.findOneAsync(swimlaneId);
|
2025-10-16 20:23:05 +03:00
|
|
|
if (!swimlane) {
|
|
|
|
|
throw new Meteor.Error('swimlane-not-found', 'Swimlane not found');
|
|
|
|
|
}
|
Update ReactiveCache call sites to use async/await for Meteor 3.0
Part 3 of ReactiveCache async migration:
- Add await before all ReactiveCache.getX() calls
- Make functions containing ReactiveCache calls async
- Convert forEach/map/filter loops with async callbacks to for...of
- Update model helpers, Meteor methods, JsonRoutes handlers
- Update collection hooks (.before/.after insert/update/remove)
- Update .allow() callbacks to async
Files updated across models/ and server/ directories:
- Model files: cards, boards, lists, swimlanes, activities, users,
checklists, checklistItems, customFields, attachments, integrations,
cardComments, settings files, creators, exporters, and more
- Server files: publications, methods, notifications, routes, migrations
2026-02-01 00:54:38 +02:00
|
|
|
|
|
|
|
|
const board = await ReactiveCache.getBoard(swimlane.boardId);
|
2026-01-18 19:29:58 +02:00
|
|
|
if (!board || !board.isVisibleBy({ _id: this.userId })) {
|
|
|
|
|
throw new Meteor.Error('not-authorized', 'You do not have access to this board.');
|
|
|
|
|
}
|
Update ReactiveCache call sites to use async/await for Meteor 3.0
Part 3 of ReactiveCache async migration:
- Add await before all ReactiveCache.getX() calls
- Make functions containing ReactiveCache calls async
- Convert forEach/map/filter loops with async callbacks to for...of
- Update model helpers, Meteor methods, JsonRoutes handlers
- Update collection hooks (.before/.after insert/update/remove)
- Update .allow() callbacks to async
Files updated across models/ and server/ directories:
- Model files: cards, boards, lists, swimlanes, activities, users,
checklists, checklistItems, customFields, attachments, integrations,
cardComments, settings files, creators, exporters, and more
- Server files: publications, methods, notifications, routes, migrations
2026-02-01 00:54:38 +02:00
|
|
|
|
2025-10-16 20:23:05 +03:00
|
|
|
return swimlane.getOriginalPosition();
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get original position for a list
|
|
|
|
|
*/
|
Update ReactiveCache call sites to use async/await for Meteor 3.0
Part 3 of ReactiveCache async migration:
- Add await before all ReactiveCache.getX() calls
- Make functions containing ReactiveCache calls async
- Convert forEach/map/filter loops with async callbacks to for...of
- Update model helpers, Meteor methods, JsonRoutes handlers
- Update collection hooks (.before/.after insert/update/remove)
- Update .allow() callbacks to async
Files updated across models/ and server/ directories:
- Model files: cards, boards, lists, swimlanes, activities, users,
checklists, checklistItems, customFields, attachments, integrations,
cardComments, settings files, creators, exporters, and more
- Server files: publications, methods, notifications, routes, migrations
2026-02-01 00:54:38 +02:00
|
|
|
async 'positionHistory.getListOriginalPosition'(listId) {
|
2025-10-16 20:23:05 +03:00
|
|
|
check(listId, String);
|
Update ReactiveCache call sites to use async/await for Meteor 3.0
Part 3 of ReactiveCache async migration:
- Add await before all ReactiveCache.getX() calls
- Make functions containing ReactiveCache calls async
- Convert forEach/map/filter loops with async callbacks to for...of
- Update model helpers, Meteor methods, JsonRoutes handlers
- Update collection hooks (.before/.after insert/update/remove)
- Update .allow() callbacks to async
Files updated across models/ and server/ directories:
- Model files: cards, boards, lists, swimlanes, activities, users,
checklists, checklistItems, customFields, attachments, integrations,
cardComments, settings files, creators, exporters, and more
- Server files: publications, methods, notifications, routes, migrations
2026-02-01 00:54:38 +02:00
|
|
|
|
2026-01-18 19:29:58 +02:00
|
|
|
if (!this.userId) {
|
|
|
|
|
throw new Meteor.Error('not-authorized', 'You must be logged in.');
|
|
|
|
|
}
|
Update ReactiveCache call sites to use async/await for Meteor 3.0
Part 3 of ReactiveCache async migration:
- Add await before all ReactiveCache.getX() calls
- Make functions containing ReactiveCache calls async
- Convert forEach/map/filter loops with async callbacks to for...of
- Update model helpers, Meteor methods, JsonRoutes handlers
- Update collection hooks (.before/.after insert/update/remove)
- Update .allow() callbacks to async
Files updated across models/ and server/ directories:
- Model files: cards, boards, lists, swimlanes, activities, users,
checklists, checklistItems, customFields, attachments, integrations,
cardComments, settings files, creators, exporters, and more
- Server files: publications, methods, notifications, routes, migrations
2026-02-01 00:54:38 +02:00
|
|
|
|
2026-02-18 18:24:55 +02:00
|
|
|
const list = await Lists.findOneAsync(listId);
|
2025-10-16 20:23:05 +03:00
|
|
|
if (!list) {
|
|
|
|
|
throw new Meteor.Error('list-not-found', 'List not found');
|
|
|
|
|
}
|
Update ReactiveCache call sites to use async/await for Meteor 3.0
Part 3 of ReactiveCache async migration:
- Add await before all ReactiveCache.getX() calls
- Make functions containing ReactiveCache calls async
- Convert forEach/map/filter loops with async callbacks to for...of
- Update model helpers, Meteor methods, JsonRoutes handlers
- Update collection hooks (.before/.after insert/update/remove)
- Update .allow() callbacks to async
Files updated across models/ and server/ directories:
- Model files: cards, boards, lists, swimlanes, activities, users,
checklists, checklistItems, customFields, attachments, integrations,
cardComments, settings files, creators, exporters, and more
- Server files: publications, methods, notifications, routes, migrations
2026-02-01 00:54:38 +02:00
|
|
|
|
|
|
|
|
const board = await ReactiveCache.getBoard(list.boardId);
|
2026-01-18 19:29:58 +02:00
|
|
|
if (!board || !board.isVisibleBy({ _id: this.userId })) {
|
|
|
|
|
throw new Meteor.Error('not-authorized', 'You do not have access to this board.');
|
|
|
|
|
}
|
Update ReactiveCache call sites to use async/await for Meteor 3.0
Part 3 of ReactiveCache async migration:
- Add await before all ReactiveCache.getX() calls
- Make functions containing ReactiveCache calls async
- Convert forEach/map/filter loops with async callbacks to for...of
- Update model helpers, Meteor methods, JsonRoutes handlers
- Update collection hooks (.before/.after insert/update/remove)
- Update .allow() callbacks to async
Files updated across models/ and server/ directories:
- Model files: cards, boards, lists, swimlanes, activities, users,
checklists, checklistItems, customFields, attachments, integrations,
cardComments, settings files, creators, exporters, and more
- Server files: publications, methods, notifications, routes, migrations
2026-02-01 00:54:38 +02:00
|
|
|
|
2025-10-16 20:23:05 +03:00
|
|
|
return list.getOriginalPosition();
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get original position for a card
|
|
|
|
|
*/
|
Update ReactiveCache call sites to use async/await for Meteor 3.0
Part 3 of ReactiveCache async migration:
- Add await before all ReactiveCache.getX() calls
- Make functions containing ReactiveCache calls async
- Convert forEach/map/filter loops with async callbacks to for...of
- Update model helpers, Meteor methods, JsonRoutes handlers
- Update collection hooks (.before/.after insert/update/remove)
- Update .allow() callbacks to async
Files updated across models/ and server/ directories:
- Model files: cards, boards, lists, swimlanes, activities, users,
checklists, checklistItems, customFields, attachments, integrations,
cardComments, settings files, creators, exporters, and more
- Server files: publications, methods, notifications, routes, migrations
2026-02-01 00:54:38 +02:00
|
|
|
async 'positionHistory.getCardOriginalPosition'(cardId) {
|
2025-10-16 20:23:05 +03:00
|
|
|
check(cardId, String);
|
Update ReactiveCache call sites to use async/await for Meteor 3.0
Part 3 of ReactiveCache async migration:
- Add await before all ReactiveCache.getX() calls
- Make functions containing ReactiveCache calls async
- Convert forEach/map/filter loops with async callbacks to for...of
- Update model helpers, Meteor methods, JsonRoutes handlers
- Update collection hooks (.before/.after insert/update/remove)
- Update .allow() callbacks to async
Files updated across models/ and server/ directories:
- Model files: cards, boards, lists, swimlanes, activities, users,
checklists, checklistItems, customFields, attachments, integrations,
cardComments, settings files, creators, exporters, and more
- Server files: publications, methods, notifications, routes, migrations
2026-02-01 00:54:38 +02:00
|
|
|
|
2026-01-18 19:29:58 +02:00
|
|
|
if (!this.userId) {
|
|
|
|
|
throw new Meteor.Error('not-authorized', 'You must be logged in.');
|
|
|
|
|
}
|
Update ReactiveCache call sites to use async/await for Meteor 3.0
Part 3 of ReactiveCache async migration:
- Add await before all ReactiveCache.getX() calls
- Make functions containing ReactiveCache calls async
- Convert forEach/map/filter loops with async callbacks to for...of
- Update model helpers, Meteor methods, JsonRoutes handlers
- Update collection hooks (.before/.after insert/update/remove)
- Update .allow() callbacks to async
Files updated across models/ and server/ directories:
- Model files: cards, boards, lists, swimlanes, activities, users,
checklists, checklistItems, customFields, attachments, integrations,
cardComments, settings files, creators, exporters, and more
- Server files: publications, methods, notifications, routes, migrations
2026-02-01 00:54:38 +02:00
|
|
|
|
2026-02-18 18:24:55 +02:00
|
|
|
const card = await Cards.findOneAsync(cardId);
|
2025-10-16 20:23:05 +03:00
|
|
|
if (!card) {
|
|
|
|
|
throw new Meteor.Error('card-not-found', 'Card not found');
|
|
|
|
|
}
|
Update ReactiveCache call sites to use async/await for Meteor 3.0
Part 3 of ReactiveCache async migration:
- Add await before all ReactiveCache.getX() calls
- Make functions containing ReactiveCache calls async
- Convert forEach/map/filter loops with async callbacks to for...of
- Update model helpers, Meteor methods, JsonRoutes handlers
- Update collection hooks (.before/.after insert/update/remove)
- Update .allow() callbacks to async
Files updated across models/ and server/ directories:
- Model files: cards, boards, lists, swimlanes, activities, users,
checklists, checklistItems, customFields, attachments, integrations,
cardComments, settings files, creators, exporters, and more
- Server files: publications, methods, notifications, routes, migrations
2026-02-01 00:54:38 +02:00
|
|
|
|
|
|
|
|
const board = await ReactiveCache.getBoard(card.boardId);
|
2026-01-18 19:29:58 +02:00
|
|
|
if (!board || !board.isVisibleBy({ _id: this.userId })) {
|
|
|
|
|
throw new Meteor.Error('not-authorized', 'You do not have access to this board.');
|
|
|
|
|
}
|
Update ReactiveCache call sites to use async/await for Meteor 3.0
Part 3 of ReactiveCache async migration:
- Add await before all ReactiveCache.getX() calls
- Make functions containing ReactiveCache calls async
- Convert forEach/map/filter loops with async callbacks to for...of
- Update model helpers, Meteor methods, JsonRoutes handlers
- Update collection hooks (.before/.after insert/update/remove)
- Update .allow() callbacks to async
Files updated across models/ and server/ directories:
- Model files: cards, boards, lists, swimlanes, activities, users,
checklists, checklistItems, customFields, attachments, integrations,
cardComments, settings files, creators, exporters, and more
- Server files: publications, methods, notifications, routes, migrations
2026-02-01 00:54:38 +02:00
|
|
|
|
2025-10-16 20:23:05 +03:00
|
|
|
return card.getOriginalPosition();
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Check if a swimlane has moved from its original position
|
|
|
|
|
*/
|
Update ReactiveCache call sites to use async/await for Meteor 3.0
Part 3 of ReactiveCache async migration:
- Add await before all ReactiveCache.getX() calls
- Make functions containing ReactiveCache calls async
- Convert forEach/map/filter loops with async callbacks to for...of
- Update model helpers, Meteor methods, JsonRoutes handlers
- Update collection hooks (.before/.after insert/update/remove)
- Update .allow() callbacks to async
Files updated across models/ and server/ directories:
- Model files: cards, boards, lists, swimlanes, activities, users,
checklists, checklistItems, customFields, attachments, integrations,
cardComments, settings files, creators, exporters, and more
- Server files: publications, methods, notifications, routes, migrations
2026-02-01 00:54:38 +02:00
|
|
|
async 'positionHistory.hasSwimlaneMoved'(swimlaneId) {
|
2025-10-16 20:23:05 +03:00
|
|
|
check(swimlaneId, String);
|
Update ReactiveCache call sites to use async/await for Meteor 3.0
Part 3 of ReactiveCache async migration:
- Add await before all ReactiveCache.getX() calls
- Make functions containing ReactiveCache calls async
- Convert forEach/map/filter loops with async callbacks to for...of
- Update model helpers, Meteor methods, JsonRoutes handlers
- Update collection hooks (.before/.after insert/update/remove)
- Update .allow() callbacks to async
Files updated across models/ and server/ directories:
- Model files: cards, boards, lists, swimlanes, activities, users,
checklists, checklistItems, customFields, attachments, integrations,
cardComments, settings files, creators, exporters, and more
- Server files: publications, methods, notifications, routes, migrations
2026-02-01 00:54:38 +02:00
|
|
|
|
2026-01-18 19:29:58 +02:00
|
|
|
if (!this.userId) {
|
|
|
|
|
throw new Meteor.Error('not-authorized', 'You must be logged in.');
|
|
|
|
|
}
|
Update ReactiveCache call sites to use async/await for Meteor 3.0
Part 3 of ReactiveCache async migration:
- Add await before all ReactiveCache.getX() calls
- Make functions containing ReactiveCache calls async
- Convert forEach/map/filter loops with async callbacks to for...of
- Update model helpers, Meteor methods, JsonRoutes handlers
- Update collection hooks (.before/.after insert/update/remove)
- Update .allow() callbacks to async
Files updated across models/ and server/ directories:
- Model files: cards, boards, lists, swimlanes, activities, users,
checklists, checklistItems, customFields, attachments, integrations,
cardComments, settings files, creators, exporters, and more
- Server files: publications, methods, notifications, routes, migrations
2026-02-01 00:54:38 +02:00
|
|
|
|
2026-02-18 18:24:55 +02:00
|
|
|
const swimlane = await Swimlanes.findOneAsync(swimlaneId);
|
2025-10-16 20:23:05 +03:00
|
|
|
if (!swimlane) {
|
|
|
|
|
throw new Meteor.Error('swimlane-not-found', 'Swimlane not found');
|
|
|
|
|
}
|
Update ReactiveCache call sites to use async/await for Meteor 3.0
Part 3 of ReactiveCache async migration:
- Add await before all ReactiveCache.getX() calls
- Make functions containing ReactiveCache calls async
- Convert forEach/map/filter loops with async callbacks to for...of
- Update model helpers, Meteor methods, JsonRoutes handlers
- Update collection hooks (.before/.after insert/update/remove)
- Update .allow() callbacks to async
Files updated across models/ and server/ directories:
- Model files: cards, boards, lists, swimlanes, activities, users,
checklists, checklistItems, customFields, attachments, integrations,
cardComments, settings files, creators, exporters, and more
- Server files: publications, methods, notifications, routes, migrations
2026-02-01 00:54:38 +02:00
|
|
|
|
|
|
|
|
const board = await ReactiveCache.getBoard(swimlane.boardId);
|
2026-01-18 19:29:58 +02:00
|
|
|
if (!board || !board.isVisibleBy({ _id: this.userId })) {
|
|
|
|
|
throw new Meteor.Error('not-authorized', 'You do not have access to this board.');
|
|
|
|
|
}
|
Update ReactiveCache call sites to use async/await for Meteor 3.0
Part 3 of ReactiveCache async migration:
- Add await before all ReactiveCache.getX() calls
- Make functions containing ReactiveCache calls async
- Convert forEach/map/filter loops with async callbacks to for...of
- Update model helpers, Meteor methods, JsonRoutes handlers
- Update collection hooks (.before/.after insert/update/remove)
- Update .allow() callbacks to async
Files updated across models/ and server/ directories:
- Model files: cards, boards, lists, swimlanes, activities, users,
checklists, checklistItems, customFields, attachments, integrations,
cardComments, settings files, creators, exporters, and more
- Server files: publications, methods, notifications, routes, migrations
2026-02-01 00:54:38 +02:00
|
|
|
|
2025-10-16 20:23:05 +03:00
|
|
|
return swimlane.hasMovedFromOriginalPosition();
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Check if a list has moved from its original position
|
|
|
|
|
*/
|
Update ReactiveCache call sites to use async/await for Meteor 3.0
Part 3 of ReactiveCache async migration:
- Add await before all ReactiveCache.getX() calls
- Make functions containing ReactiveCache calls async
- Convert forEach/map/filter loops with async callbacks to for...of
- Update model helpers, Meteor methods, JsonRoutes handlers
- Update collection hooks (.before/.after insert/update/remove)
- Update .allow() callbacks to async
Files updated across models/ and server/ directories:
- Model files: cards, boards, lists, swimlanes, activities, users,
checklists, checklistItems, customFields, attachments, integrations,
cardComments, settings files, creators, exporters, and more
- Server files: publications, methods, notifications, routes, migrations
2026-02-01 00:54:38 +02:00
|
|
|
async 'positionHistory.hasListMoved'(listId) {
|
2025-10-16 20:23:05 +03:00
|
|
|
check(listId, String);
|
Update ReactiveCache call sites to use async/await for Meteor 3.0
Part 3 of ReactiveCache async migration:
- Add await before all ReactiveCache.getX() calls
- Make functions containing ReactiveCache calls async
- Convert forEach/map/filter loops with async callbacks to for...of
- Update model helpers, Meteor methods, JsonRoutes handlers
- Update collection hooks (.before/.after insert/update/remove)
- Update .allow() callbacks to async
Files updated across models/ and server/ directories:
- Model files: cards, boards, lists, swimlanes, activities, users,
checklists, checklistItems, customFields, attachments, integrations,
cardComments, settings files, creators, exporters, and more
- Server files: publications, methods, notifications, routes, migrations
2026-02-01 00:54:38 +02:00
|
|
|
|
2026-01-18 19:29:58 +02:00
|
|
|
if (!this.userId) {
|
|
|
|
|
throw new Meteor.Error('not-authorized', 'You must be logged in.');
|
|
|
|
|
}
|
Update ReactiveCache call sites to use async/await for Meteor 3.0
Part 3 of ReactiveCache async migration:
- Add await before all ReactiveCache.getX() calls
- Make functions containing ReactiveCache calls async
- Convert forEach/map/filter loops with async callbacks to for...of
- Update model helpers, Meteor methods, JsonRoutes handlers
- Update collection hooks (.before/.after insert/update/remove)
- Update .allow() callbacks to async
Files updated across models/ and server/ directories:
- Model files: cards, boards, lists, swimlanes, activities, users,
checklists, checklistItems, customFields, attachments, integrations,
cardComments, settings files, creators, exporters, and more
- Server files: publications, methods, notifications, routes, migrations
2026-02-01 00:54:38 +02:00
|
|
|
|
2026-02-18 18:24:55 +02:00
|
|
|
const list = await Lists.findOneAsync(listId);
|
2025-10-16 20:23:05 +03:00
|
|
|
if (!list) {
|
|
|
|
|
throw new Meteor.Error('list-not-found', 'List not found');
|
|
|
|
|
}
|
Update ReactiveCache call sites to use async/await for Meteor 3.0
Part 3 of ReactiveCache async migration:
- Add await before all ReactiveCache.getX() calls
- Make functions containing ReactiveCache calls async
- Convert forEach/map/filter loops with async callbacks to for...of
- Update model helpers, Meteor methods, JsonRoutes handlers
- Update collection hooks (.before/.after insert/update/remove)
- Update .allow() callbacks to async
Files updated across models/ and server/ directories:
- Model files: cards, boards, lists, swimlanes, activities, users,
checklists, checklistItems, customFields, attachments, integrations,
cardComments, settings files, creators, exporters, and more
- Server files: publications, methods, notifications, routes, migrations
2026-02-01 00:54:38 +02:00
|
|
|
|
|
|
|
|
const board = await ReactiveCache.getBoard(list.boardId);
|
2026-01-18 19:29:58 +02:00
|
|
|
if (!board || !board.isVisibleBy({ _id: this.userId })) {
|
|
|
|
|
throw new Meteor.Error('not-authorized', 'You do not have access to this board.');
|
|
|
|
|
}
|
Update ReactiveCache call sites to use async/await for Meteor 3.0
Part 3 of ReactiveCache async migration:
- Add await before all ReactiveCache.getX() calls
- Make functions containing ReactiveCache calls async
- Convert forEach/map/filter loops with async callbacks to for...of
- Update model helpers, Meteor methods, JsonRoutes handlers
- Update collection hooks (.before/.after insert/update/remove)
- Update .allow() callbacks to async
Files updated across models/ and server/ directories:
- Model files: cards, boards, lists, swimlanes, activities, users,
checklists, checklistItems, customFields, attachments, integrations,
cardComments, settings files, creators, exporters, and more
- Server files: publications, methods, notifications, routes, migrations
2026-02-01 00:54:38 +02:00
|
|
|
|
2025-10-16 20:23:05 +03:00
|
|
|
return list.hasMovedFromOriginalPosition();
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Check if a card has moved from its original position
|
|
|
|
|
*/
|
Update ReactiveCache call sites to use async/await for Meteor 3.0
Part 3 of ReactiveCache async migration:
- Add await before all ReactiveCache.getX() calls
- Make functions containing ReactiveCache calls async
- Convert forEach/map/filter loops with async callbacks to for...of
- Update model helpers, Meteor methods, JsonRoutes handlers
- Update collection hooks (.before/.after insert/update/remove)
- Update .allow() callbacks to async
Files updated across models/ and server/ directories:
- Model files: cards, boards, lists, swimlanes, activities, users,
checklists, checklistItems, customFields, attachments, integrations,
cardComments, settings files, creators, exporters, and more
- Server files: publications, methods, notifications, routes, migrations
2026-02-01 00:54:38 +02:00
|
|
|
async 'positionHistory.hasCardMoved'(cardId) {
|
2025-10-16 20:23:05 +03:00
|
|
|
check(cardId, String);
|
Update ReactiveCache call sites to use async/await for Meteor 3.0
Part 3 of ReactiveCache async migration:
- Add await before all ReactiveCache.getX() calls
- Make functions containing ReactiveCache calls async
- Convert forEach/map/filter loops with async callbacks to for...of
- Update model helpers, Meteor methods, JsonRoutes handlers
- Update collection hooks (.before/.after insert/update/remove)
- Update .allow() callbacks to async
Files updated across models/ and server/ directories:
- Model files: cards, boards, lists, swimlanes, activities, users,
checklists, checklistItems, customFields, attachments, integrations,
cardComments, settings files, creators, exporters, and more
- Server files: publications, methods, notifications, routes, migrations
2026-02-01 00:54:38 +02:00
|
|
|
|
2026-01-18 19:29:58 +02:00
|
|
|
if (!this.userId) {
|
|
|
|
|
throw new Meteor.Error('not-authorized', 'You must be logged in.');
|
|
|
|
|
}
|
Update ReactiveCache call sites to use async/await for Meteor 3.0
Part 3 of ReactiveCache async migration:
- Add await before all ReactiveCache.getX() calls
- Make functions containing ReactiveCache calls async
- Convert forEach/map/filter loops with async callbacks to for...of
- Update model helpers, Meteor methods, JsonRoutes handlers
- Update collection hooks (.before/.after insert/update/remove)
- Update .allow() callbacks to async
Files updated across models/ and server/ directories:
- Model files: cards, boards, lists, swimlanes, activities, users,
checklists, checklistItems, customFields, attachments, integrations,
cardComments, settings files, creators, exporters, and more
- Server files: publications, methods, notifications, routes, migrations
2026-02-01 00:54:38 +02:00
|
|
|
|
2026-02-18 18:24:55 +02:00
|
|
|
const card = await Cards.findOneAsync(cardId);
|
2025-10-16 20:23:05 +03:00
|
|
|
if (!card) {
|
|
|
|
|
throw new Meteor.Error('card-not-found', 'Card not found');
|
|
|
|
|
}
|
Update ReactiveCache call sites to use async/await for Meteor 3.0
Part 3 of ReactiveCache async migration:
- Add await before all ReactiveCache.getX() calls
- Make functions containing ReactiveCache calls async
- Convert forEach/map/filter loops with async callbacks to for...of
- Update model helpers, Meteor methods, JsonRoutes handlers
- Update collection hooks (.before/.after insert/update/remove)
- Update .allow() callbacks to async
Files updated across models/ and server/ directories:
- Model files: cards, boards, lists, swimlanes, activities, users,
checklists, checklistItems, customFields, attachments, integrations,
cardComments, settings files, creators, exporters, and more
- Server files: publications, methods, notifications, routes, migrations
2026-02-01 00:54:38 +02:00
|
|
|
|
|
|
|
|
const board = await ReactiveCache.getBoard(card.boardId);
|
2026-01-18 19:29:58 +02:00
|
|
|
if (!board || !board.isVisibleBy({ _id: this.userId })) {
|
|
|
|
|
throw new Meteor.Error('not-authorized', 'You do not have access to this board.');
|
|
|
|
|
}
|
Update ReactiveCache call sites to use async/await for Meteor 3.0
Part 3 of ReactiveCache async migration:
- Add await before all ReactiveCache.getX() calls
- Make functions containing ReactiveCache calls async
- Convert forEach/map/filter loops with async callbacks to for...of
- Update model helpers, Meteor methods, JsonRoutes handlers
- Update collection hooks (.before/.after insert/update/remove)
- Update .allow() callbacks to async
Files updated across models/ and server/ directories:
- Model files: cards, boards, lists, swimlanes, activities, users,
checklists, checklistItems, customFields, attachments, integrations,
cardComments, settings files, creators, exporters, and more
- Server files: publications, methods, notifications, routes, migrations
2026-02-01 00:54:38 +02:00
|
|
|
|
2025-10-16 20:23:05 +03:00
|
|
|
return card.hasMovedFromOriginalPosition();
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get original position description for a swimlane
|
|
|
|
|
*/
|
Update ReactiveCache call sites to use async/await for Meteor 3.0
Part 3 of ReactiveCache async migration:
- Add await before all ReactiveCache.getX() calls
- Make functions containing ReactiveCache calls async
- Convert forEach/map/filter loops with async callbacks to for...of
- Update model helpers, Meteor methods, JsonRoutes handlers
- Update collection hooks (.before/.after insert/update/remove)
- Update .allow() callbacks to async
Files updated across models/ and server/ directories:
- Model files: cards, boards, lists, swimlanes, activities, users,
checklists, checklistItems, customFields, attachments, integrations,
cardComments, settings files, creators, exporters, and more
- Server files: publications, methods, notifications, routes, migrations
2026-02-01 00:54:38 +02:00
|
|
|
async 'positionHistory.getSwimlaneDescription'(swimlaneId) {
|
2025-10-16 20:23:05 +03:00
|
|
|
check(swimlaneId, String);
|
Update ReactiveCache call sites to use async/await for Meteor 3.0
Part 3 of ReactiveCache async migration:
- Add await before all ReactiveCache.getX() calls
- Make functions containing ReactiveCache calls async
- Convert forEach/map/filter loops with async callbacks to for...of
- Update model helpers, Meteor methods, JsonRoutes handlers
- Update collection hooks (.before/.after insert/update/remove)
- Update .allow() callbacks to async
Files updated across models/ and server/ directories:
- Model files: cards, boards, lists, swimlanes, activities, users,
checklists, checklistItems, customFields, attachments, integrations,
cardComments, settings files, creators, exporters, and more
- Server files: publications, methods, notifications, routes, migrations
2026-02-01 00:54:38 +02:00
|
|
|
|
2026-01-18 19:29:58 +02:00
|
|
|
if (!this.userId) {
|
|
|
|
|
throw new Meteor.Error('not-authorized', 'You must be logged in.');
|
|
|
|
|
}
|
Update ReactiveCache call sites to use async/await for Meteor 3.0
Part 3 of ReactiveCache async migration:
- Add await before all ReactiveCache.getX() calls
- Make functions containing ReactiveCache calls async
- Convert forEach/map/filter loops with async callbacks to for...of
- Update model helpers, Meteor methods, JsonRoutes handlers
- Update collection hooks (.before/.after insert/update/remove)
- Update .allow() callbacks to async
Files updated across models/ and server/ directories:
- Model files: cards, boards, lists, swimlanes, activities, users,
checklists, checklistItems, customFields, attachments, integrations,
cardComments, settings files, creators, exporters, and more
- Server files: publications, methods, notifications, routes, migrations
2026-02-01 00:54:38 +02:00
|
|
|
|
2026-02-18 18:24:55 +02:00
|
|
|
const swimlane = await Swimlanes.findOneAsync(swimlaneId);
|
2025-10-16 20:23:05 +03:00
|
|
|
if (!swimlane) {
|
|
|
|
|
throw new Meteor.Error('swimlane-not-found', 'Swimlane not found');
|
|
|
|
|
}
|
Update ReactiveCache call sites to use async/await for Meteor 3.0
Part 3 of ReactiveCache async migration:
- Add await before all ReactiveCache.getX() calls
- Make functions containing ReactiveCache calls async
- Convert forEach/map/filter loops with async callbacks to for...of
- Update model helpers, Meteor methods, JsonRoutes handlers
- Update collection hooks (.before/.after insert/update/remove)
- Update .allow() callbacks to async
Files updated across models/ and server/ directories:
- Model files: cards, boards, lists, swimlanes, activities, users,
checklists, checklistItems, customFields, attachments, integrations,
cardComments, settings files, creators, exporters, and more
- Server files: publications, methods, notifications, routes, migrations
2026-02-01 00:54:38 +02:00
|
|
|
|
|
|
|
|
const board = await ReactiveCache.getBoard(swimlane.boardId);
|
2026-01-18 19:29:58 +02:00
|
|
|
if (!board || !board.isVisibleBy({ _id: this.userId })) {
|
|
|
|
|
throw new Meteor.Error('not-authorized', 'You do not have access to this board.');
|
|
|
|
|
}
|
Update ReactiveCache call sites to use async/await for Meteor 3.0
Part 3 of ReactiveCache async migration:
- Add await before all ReactiveCache.getX() calls
- Make functions containing ReactiveCache calls async
- Convert forEach/map/filter loops with async callbacks to for...of
- Update model helpers, Meteor methods, JsonRoutes handlers
- Update collection hooks (.before/.after insert/update/remove)
- Update .allow() callbacks to async
Files updated across models/ and server/ directories:
- Model files: cards, boards, lists, swimlanes, activities, users,
checklists, checklistItems, customFields, attachments, integrations,
cardComments, settings files, creators, exporters, and more
- Server files: publications, methods, notifications, routes, migrations
2026-02-01 00:54:38 +02:00
|
|
|
|
2025-10-16 20:23:05 +03:00
|
|
|
return swimlane.getOriginalPositionDescription();
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get original position description for a list
|
|
|
|
|
*/
|
Update ReactiveCache call sites to use async/await for Meteor 3.0
Part 3 of ReactiveCache async migration:
- Add await before all ReactiveCache.getX() calls
- Make functions containing ReactiveCache calls async
- Convert forEach/map/filter loops with async callbacks to for...of
- Update model helpers, Meteor methods, JsonRoutes handlers
- Update collection hooks (.before/.after insert/update/remove)
- Update .allow() callbacks to async
Files updated across models/ and server/ directories:
- Model files: cards, boards, lists, swimlanes, activities, users,
checklists, checklistItems, customFields, attachments, integrations,
cardComments, settings files, creators, exporters, and more
- Server files: publications, methods, notifications, routes, migrations
2026-02-01 00:54:38 +02:00
|
|
|
async 'positionHistory.getListDescription'(listId) {
|
2025-10-16 20:23:05 +03:00
|
|
|
check(listId, String);
|
Update ReactiveCache call sites to use async/await for Meteor 3.0
Part 3 of ReactiveCache async migration:
- Add await before all ReactiveCache.getX() calls
- Make functions containing ReactiveCache calls async
- Convert forEach/map/filter loops with async callbacks to for...of
- Update model helpers, Meteor methods, JsonRoutes handlers
- Update collection hooks (.before/.after insert/update/remove)
- Update .allow() callbacks to async
Files updated across models/ and server/ directories:
- Model files: cards, boards, lists, swimlanes, activities, users,
checklists, checklistItems, customFields, attachments, integrations,
cardComments, settings files, creators, exporters, and more
- Server files: publications, methods, notifications, routes, migrations
2026-02-01 00:54:38 +02:00
|
|
|
|
2026-01-18 19:29:58 +02:00
|
|
|
if (!this.userId) {
|
|
|
|
|
throw new Meteor.Error('not-authorized', 'You must be logged in.');
|
|
|
|
|
}
|
Update ReactiveCache call sites to use async/await for Meteor 3.0
Part 3 of ReactiveCache async migration:
- Add await before all ReactiveCache.getX() calls
- Make functions containing ReactiveCache calls async
- Convert forEach/map/filter loops with async callbacks to for...of
- Update model helpers, Meteor methods, JsonRoutes handlers
- Update collection hooks (.before/.after insert/update/remove)
- Update .allow() callbacks to async
Files updated across models/ and server/ directories:
- Model files: cards, boards, lists, swimlanes, activities, users,
checklists, checklistItems, customFields, attachments, integrations,
cardComments, settings files, creators, exporters, and more
- Server files: publications, methods, notifications, routes, migrations
2026-02-01 00:54:38 +02:00
|
|
|
|
2026-02-18 18:24:55 +02:00
|
|
|
const list = await Lists.findOneAsync(listId);
|
2025-10-16 20:23:05 +03:00
|
|
|
if (!list) {
|
|
|
|
|
throw new Meteor.Error('list-not-found', 'List not found');
|
|
|
|
|
}
|
Update ReactiveCache call sites to use async/await for Meteor 3.0
Part 3 of ReactiveCache async migration:
- Add await before all ReactiveCache.getX() calls
- Make functions containing ReactiveCache calls async
- Convert forEach/map/filter loops with async callbacks to for...of
- Update model helpers, Meteor methods, JsonRoutes handlers
- Update collection hooks (.before/.after insert/update/remove)
- Update .allow() callbacks to async
Files updated across models/ and server/ directories:
- Model files: cards, boards, lists, swimlanes, activities, users,
checklists, checklistItems, customFields, attachments, integrations,
cardComments, settings files, creators, exporters, and more
- Server files: publications, methods, notifications, routes, migrations
2026-02-01 00:54:38 +02:00
|
|
|
|
|
|
|
|
const board = await ReactiveCache.getBoard(list.boardId);
|
2026-01-18 19:29:58 +02:00
|
|
|
if (!board || !board.isVisibleBy({ _id: this.userId })) {
|
|
|
|
|
throw new Meteor.Error('not-authorized', 'You do not have access to this board.');
|
|
|
|
|
}
|
Update ReactiveCache call sites to use async/await for Meteor 3.0
Part 3 of ReactiveCache async migration:
- Add await before all ReactiveCache.getX() calls
- Make functions containing ReactiveCache calls async
- Convert forEach/map/filter loops with async callbacks to for...of
- Update model helpers, Meteor methods, JsonRoutes handlers
- Update collection hooks (.before/.after insert/update/remove)
- Update .allow() callbacks to async
Files updated across models/ and server/ directories:
- Model files: cards, boards, lists, swimlanes, activities, users,
checklists, checklistItems, customFields, attachments, integrations,
cardComments, settings files, creators, exporters, and more
- Server files: publications, methods, notifications, routes, migrations
2026-02-01 00:54:38 +02:00
|
|
|
|
2025-10-16 20:23:05 +03:00
|
|
|
return list.getOriginalPositionDescription();
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get original position description for a card
|
|
|
|
|
*/
|
Update ReactiveCache call sites to use async/await for Meteor 3.0
Part 3 of ReactiveCache async migration:
- Add await before all ReactiveCache.getX() calls
- Make functions containing ReactiveCache calls async
- Convert forEach/map/filter loops with async callbacks to for...of
- Update model helpers, Meteor methods, JsonRoutes handlers
- Update collection hooks (.before/.after insert/update/remove)
- Update .allow() callbacks to async
Files updated across models/ and server/ directories:
- Model files: cards, boards, lists, swimlanes, activities, users,
checklists, checklistItems, customFields, attachments, integrations,
cardComments, settings files, creators, exporters, and more
- Server files: publications, methods, notifications, routes, migrations
2026-02-01 00:54:38 +02:00
|
|
|
async 'positionHistory.getCardDescription'(cardId) {
|
2025-10-16 20:23:05 +03:00
|
|
|
check(cardId, String);
|
Update ReactiveCache call sites to use async/await for Meteor 3.0
Part 3 of ReactiveCache async migration:
- Add await before all ReactiveCache.getX() calls
- Make functions containing ReactiveCache calls async
- Convert forEach/map/filter loops with async callbacks to for...of
- Update model helpers, Meteor methods, JsonRoutes handlers
- Update collection hooks (.before/.after insert/update/remove)
- Update .allow() callbacks to async
Files updated across models/ and server/ directories:
- Model files: cards, boards, lists, swimlanes, activities, users,
checklists, checklistItems, customFields, attachments, integrations,
cardComments, settings files, creators, exporters, and more
- Server files: publications, methods, notifications, routes, migrations
2026-02-01 00:54:38 +02:00
|
|
|
|
2026-01-18 19:29:58 +02:00
|
|
|
if (!this.userId) {
|
|
|
|
|
throw new Meteor.Error('not-authorized', 'You must be logged in.');
|
|
|
|
|
}
|
Update ReactiveCache call sites to use async/await for Meteor 3.0
Part 3 of ReactiveCache async migration:
- Add await before all ReactiveCache.getX() calls
- Make functions containing ReactiveCache calls async
- Convert forEach/map/filter loops with async callbacks to for...of
- Update model helpers, Meteor methods, JsonRoutes handlers
- Update collection hooks (.before/.after insert/update/remove)
- Update .allow() callbacks to async
Files updated across models/ and server/ directories:
- Model files: cards, boards, lists, swimlanes, activities, users,
checklists, checklistItems, customFields, attachments, integrations,
cardComments, settings files, creators, exporters, and more
- Server files: publications, methods, notifications, routes, migrations
2026-02-01 00:54:38 +02:00
|
|
|
|
2026-02-18 18:24:55 +02:00
|
|
|
const card = await Cards.findOneAsync(cardId);
|
2025-10-16 20:23:05 +03:00
|
|
|
if (!card) {
|
|
|
|
|
throw new Meteor.Error('card-not-found', 'Card not found');
|
|
|
|
|
}
|
Update ReactiveCache call sites to use async/await for Meteor 3.0
Part 3 of ReactiveCache async migration:
- Add await before all ReactiveCache.getX() calls
- Make functions containing ReactiveCache calls async
- Convert forEach/map/filter loops with async callbacks to for...of
- Update model helpers, Meteor methods, JsonRoutes handlers
- Update collection hooks (.before/.after insert/update/remove)
- Update .allow() callbacks to async
Files updated across models/ and server/ directories:
- Model files: cards, boards, lists, swimlanes, activities, users,
checklists, checklistItems, customFields, attachments, integrations,
cardComments, settings files, creators, exporters, and more
- Server files: publications, methods, notifications, routes, migrations
2026-02-01 00:54:38 +02:00
|
|
|
|
|
|
|
|
const board = await ReactiveCache.getBoard(card.boardId);
|
2026-01-18 19:29:58 +02:00
|
|
|
if (!board || !board.isVisibleBy({ _id: this.userId })) {
|
|
|
|
|
throw new Meteor.Error('not-authorized', 'You do not have access to this board.');
|
|
|
|
|
}
|
Update ReactiveCache call sites to use async/await for Meteor 3.0
Part 3 of ReactiveCache async migration:
- Add await before all ReactiveCache.getX() calls
- Make functions containing ReactiveCache calls async
- Convert forEach/map/filter loops with async callbacks to for...of
- Update model helpers, Meteor methods, JsonRoutes handlers
- Update collection hooks (.before/.after insert/update/remove)
- Update .allow() callbacks to async
Files updated across models/ and server/ directories:
- Model files: cards, boards, lists, swimlanes, activities, users,
checklists, checklistItems, customFields, attachments, integrations,
cardComments, settings files, creators, exporters, and more
- Server files: publications, methods, notifications, routes, migrations
2026-02-01 00:54:38 +02:00
|
|
|
|
2025-10-16 20:23:05 +03:00
|
|
|
return card.getOriginalPositionDescription();
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get all position history for a board
|
|
|
|
|
*/
|
Update ReactiveCache call sites to use async/await for Meteor 3.0
Part 3 of ReactiveCache async migration:
- Add await before all ReactiveCache.getX() calls
- Make functions containing ReactiveCache calls async
- Convert forEach/map/filter loops with async callbacks to for...of
- Update model helpers, Meteor methods, JsonRoutes handlers
- Update collection hooks (.before/.after insert/update/remove)
- Update .allow() callbacks to async
Files updated across models/ and server/ directories:
- Model files: cards, boards, lists, swimlanes, activities, users,
checklists, checklistItems, customFields, attachments, integrations,
cardComments, settings files, creators, exporters, and more
- Server files: publications, methods, notifications, routes, migrations
2026-02-01 00:54:38 +02:00
|
|
|
async 'positionHistory.getBoardHistory'(boardId) {
|
2025-10-16 20:23:05 +03:00
|
|
|
check(boardId, String);
|
Update ReactiveCache call sites to use async/await for Meteor 3.0
Part 3 of ReactiveCache async migration:
- Add await before all ReactiveCache.getX() calls
- Make functions containing ReactiveCache calls async
- Convert forEach/map/filter loops with async callbacks to for...of
- Update model helpers, Meteor methods, JsonRoutes handlers
- Update collection hooks (.before/.after insert/update/remove)
- Update .allow() callbacks to async
Files updated across models/ and server/ directories:
- Model files: cards, boards, lists, swimlanes, activities, users,
checklists, checklistItems, customFields, attachments, integrations,
cardComments, settings files, creators, exporters, and more
- Server files: publications, methods, notifications, routes, migrations
2026-02-01 00:54:38 +02:00
|
|
|
|
2026-01-18 19:29:58 +02:00
|
|
|
if (!this.userId) {
|
|
|
|
|
throw new Meteor.Error('not-authorized', 'You must be logged in.');
|
|
|
|
|
}
|
Update ReactiveCache call sites to use async/await for Meteor 3.0
Part 3 of ReactiveCache async migration:
- Add await before all ReactiveCache.getX() calls
- Make functions containing ReactiveCache calls async
- Convert forEach/map/filter loops with async callbacks to for...of
- Update model helpers, Meteor methods, JsonRoutes handlers
- Update collection hooks (.before/.after insert/update/remove)
- Update .allow() callbacks to async
Files updated across models/ and server/ directories:
- Model files: cards, boards, lists, swimlanes, activities, users,
checklists, checklistItems, customFields, attachments, integrations,
cardComments, settings files, creators, exporters, and more
- Server files: publications, methods, notifications, routes, migrations
2026-02-01 00:54:38 +02:00
|
|
|
|
|
|
|
|
const board = await ReactiveCache.getBoard(boardId);
|
2026-01-18 19:29:58 +02:00
|
|
|
if (!board || !board.isVisibleBy({ _id: this.userId })) {
|
|
|
|
|
throw new Meteor.Error('not-authorized', 'You do not have access to this board.');
|
|
|
|
|
}
|
Update ReactiveCache call sites to use async/await for Meteor 3.0
Part 3 of ReactiveCache async migration:
- Add await before all ReactiveCache.getX() calls
- Make functions containing ReactiveCache calls async
- Convert forEach/map/filter loops with async callbacks to for...of
- Update model helpers, Meteor methods, JsonRoutes handlers
- Update collection hooks (.before/.after insert/update/remove)
- Update .allow() callbacks to async
Files updated across models/ and server/ directories:
- Model files: cards, boards, lists, swimlanes, activities, users,
checklists, checklistItems, customFields, attachments, integrations,
cardComments, settings files, creators, exporters, and more
- Server files: publications, methods, notifications, routes, migrations
2026-02-01 00:54:38 +02:00
|
|
|
|
2025-10-16 20:23:05 +03:00
|
|
|
return PositionHistory.find({
|
|
|
|
|
boardId: boardId,
|
|
|
|
|
}, {
|
|
|
|
|
sort: { createdAt: -1 }
|
2026-02-18 18:24:55 +02:00
|
|
|
}).fetchAsync();
|
2025-10-16 20:23:05 +03:00
|
|
|
},
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get position history by entity type for a board
|
|
|
|
|
*/
|
Update ReactiveCache call sites to use async/await for Meteor 3.0
Part 3 of ReactiveCache async migration:
- Add await before all ReactiveCache.getX() calls
- Make functions containing ReactiveCache calls async
- Convert forEach/map/filter loops with async callbacks to for...of
- Update model helpers, Meteor methods, JsonRoutes handlers
- Update collection hooks (.before/.after insert/update/remove)
- Update .allow() callbacks to async
Files updated across models/ and server/ directories:
- Model files: cards, boards, lists, swimlanes, activities, users,
checklists, checklistItems, customFields, attachments, integrations,
cardComments, settings files, creators, exporters, and more
- Server files: publications, methods, notifications, routes, migrations
2026-02-01 00:54:38 +02:00
|
|
|
async 'positionHistory.getBoardHistoryByType'(boardId, entityType) {
|
2025-10-16 20:23:05 +03:00
|
|
|
check(boardId, String);
|
|
|
|
|
check(entityType, String);
|
Update ReactiveCache call sites to use async/await for Meteor 3.0
Part 3 of ReactiveCache async migration:
- Add await before all ReactiveCache.getX() calls
- Make functions containing ReactiveCache calls async
- Convert forEach/map/filter loops with async callbacks to for...of
- Update model helpers, Meteor methods, JsonRoutes handlers
- Update collection hooks (.before/.after insert/update/remove)
- Update .allow() callbacks to async
Files updated across models/ and server/ directories:
- Model files: cards, boards, lists, swimlanes, activities, users,
checklists, checklistItems, customFields, attachments, integrations,
cardComments, settings files, creators, exporters, and more
- Server files: publications, methods, notifications, routes, migrations
2026-02-01 00:54:38 +02:00
|
|
|
|
2026-01-18 19:29:58 +02:00
|
|
|
if (!this.userId) {
|
|
|
|
|
throw new Meteor.Error('not-authorized', 'You must be logged in.');
|
|
|
|
|
}
|
Update ReactiveCache call sites to use async/await for Meteor 3.0
Part 3 of ReactiveCache async migration:
- Add await before all ReactiveCache.getX() calls
- Make functions containing ReactiveCache calls async
- Convert forEach/map/filter loops with async callbacks to for...of
- Update model helpers, Meteor methods, JsonRoutes handlers
- Update collection hooks (.before/.after insert/update/remove)
- Update .allow() callbacks to async
Files updated across models/ and server/ directories:
- Model files: cards, boards, lists, swimlanes, activities, users,
checklists, checklistItems, customFields, attachments, integrations,
cardComments, settings files, creators, exporters, and more
- Server files: publications, methods, notifications, routes, migrations
2026-02-01 00:54:38 +02:00
|
|
|
|
|
|
|
|
const board = await ReactiveCache.getBoard(boardId);
|
2026-01-18 19:29:58 +02:00
|
|
|
if (!board || !board.isVisibleBy({ _id: this.userId })) {
|
|
|
|
|
throw new Meteor.Error('not-authorized', 'You do not have access to this board.');
|
|
|
|
|
}
|
Update ReactiveCache call sites to use async/await for Meteor 3.0
Part 3 of ReactiveCache async migration:
- Add await before all ReactiveCache.getX() calls
- Make functions containing ReactiveCache calls async
- Convert forEach/map/filter loops with async callbacks to for...of
- Update model helpers, Meteor methods, JsonRoutes handlers
- Update collection hooks (.before/.after insert/update/remove)
- Update .allow() callbacks to async
Files updated across models/ and server/ directories:
- Model files: cards, boards, lists, swimlanes, activities, users,
checklists, checklistItems, customFields, attachments, integrations,
cardComments, settings files, creators, exporters, and more
- Server files: publications, methods, notifications, routes, migrations
2026-02-01 00:54:38 +02:00
|
|
|
|
2025-10-16 20:23:05 +03:00
|
|
|
if (!['swimlane', 'list', 'card'].includes(entityType)) {
|
|
|
|
|
throw new Meteor.Error('invalid-entity-type', 'Entity type must be swimlane, list, or card');
|
|
|
|
|
}
|
Update ReactiveCache call sites to use async/await for Meteor 3.0
Part 3 of ReactiveCache async migration:
- Add await before all ReactiveCache.getX() calls
- Make functions containing ReactiveCache calls async
- Convert forEach/map/filter loops with async callbacks to for...of
- Update model helpers, Meteor methods, JsonRoutes handlers
- Update collection hooks (.before/.after insert/update/remove)
- Update .allow() callbacks to async
Files updated across models/ and server/ directories:
- Model files: cards, boards, lists, swimlanes, activities, users,
checklists, checklistItems, customFields, attachments, integrations,
cardComments, settings files, creators, exporters, and more
- Server files: publications, methods, notifications, routes, migrations
2026-02-01 00:54:38 +02:00
|
|
|
|
2025-10-16 20:23:05 +03:00
|
|
|
return PositionHistory.find({
|
|
|
|
|
boardId: boardId,
|
|
|
|
|
entityType: entityType,
|
|
|
|
|
}, {
|
|
|
|
|
sort: { createdAt: -1 }
|
2026-02-18 18:24:55 +02:00
|
|
|
}).fetchAsync();
|
2025-10-16 20:23:05 +03:00
|
|
|
},
|
|
|
|
|
});
|