Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Ensure a new added value is added to the cache

Oliver Güntherfa2aeffd4515
diff --git a/frontend/src/app/modules/boards/board/board-actions/cached-board-action.service.ts b/frontend/src/app/modules/boards/board/board-actions/cached-board-action.service.ts
index e0ee154b739..e7a3354ab13 100644
--- a/frontend/src/app/modules/boards/board/board-actions/cached-board-action.service.ts
+++ b/frontend/src/app/modules/boards/board/board-actions/cached-board-action.service.ts
@@ -4,6 +4,7 @@ import {input} from "reactivestates";
import {HalResource} from "core-app/modules/hal/resources/hal-resource";
import {Observable} from "rxjs";
import {filter, map, take} from "rxjs/operators";
+import {Board} from "core-app/modules/boards/board/board";
@Injectable()
export abstract class CachedBoardActionService extends BoardActionService {
@@ -29,6 +30,16 @@ export abstract class CachedBoardActionService extends BoardActionService {
);
}
+ addColumnWithActionAttribute(board:Board, value:HalResource):Promise<Board> {
+ if (this.cache.value) {
+ // Add the new value to the cache
+ let newValue = [...this.cache.value, value];
+ this.cache.putValue(newValue);
+ }
+
+ return super.addColumnWithActionAttribute(board, value);
+ }
+
protected require(id:string):Promise<HalResource> {
this
.cache