Move every Swimlanes.findOne() to the ReactiveCache

This commit is contained in:
Martin Filser 2023-01-15 00:07:17 +01:00
parent 2f2aa7b08a
commit bf48d4371c
6 changed files with 11 additions and 12 deletions

View file

@ -42,7 +42,7 @@ RulesHelper = {
value = oldList.title;
}
} else if (field === 'oldSwimlaneName') {
const oldSwimlane = Swimlanes.findOne({ _id: activity.oldSwimlaneId });
const oldSwimlane = ReactiveCache.getSwimlane(activity.oldSwimlaneId);
if (oldSwimlane) {
value = oldSwimlane.title;
}
@ -86,7 +86,7 @@ RulesHelper = {
let swimlane;
let swimlaneId;
if (action.swimlaneName === '*') {
swimlane = Swimlanes.findOne(card.swimlaneId);
swimlane = ReactiveCache.getSwimlane(card.swimlaneId);
if (boardId !== action.boardId) {
swimlane = Swimlanes.findOne({
title: swimlane.title,