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
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
[#47501] fixed loading of file links for new resources
Eric Schuberteda35e299749
diff --git a/frontend/src/app/features/work-packages/components/wp-single-view/wp-single-view.component.ts b/frontend/src/app/features/work-packages/components/wp-single-view/wp-single-view.component.tsindex 0dfc0d4b658..d81e7e69312 100644--- a/frontend/src/app/features/work-packages/components/wp-single-view/wp-single-view.component.ts+++ b/frontend/src/app/features/work-packages/components/wp-single-view/wp-single-view.component.ts@@ -462,6 +462,4 @@ export class WorkPackageSingleViewComponent extends UntilDestroyedMixin implemen}return this.schemaCache.of(resource);}-- protected readonly structuredClone = structuredClone;}diff --git a/frontend/src/app/shared/components/storages/storage/storage.component.ts b/frontend/src/app/shared/components/storages/storage/storage.component.tsindex 9862306b7db..fdfcd58f224 100644--- a/frontend/src/app/shared/components/storages/storage/storage.component.ts+++ b/frontend/src/app/shared/components/storages/storage/storage.component.ts@@ -99,7 +99,6 @@ import {StorageInformationService,} from 'core-app/shared/components/storages/storage-information/storage-information.service';import { storageLocaleString } from 'core-app/shared/components/storages/functions/storages.functions';-import idFromLink from 'core-app/features/hal/helpers/id-from-link';@Component({selector: 'op-storage',@@ -210,13 +209,17 @@ export class StorageComponent extends UntilDestroyedMixin implements OnInit, OnD}ngOnInit():void {- this.storagesResourceService.requireEntity(this.projectStorage._links.storage.href).subscribe();-- this.storage = this.storagesResourceService.lookup(idFromLink(this.projectStorage._links.storage.href));+ this.storage = this.storagesResourceService.requireEntity(this.projectStorage._links.storage.href);this.fileLinks = this.collectionKey().pipe(- switchMap((key) => this.fileLinkResourceService.requireCollection(key)),+ switchMap((key) => {+ if (isNewResource(this.resource)) {+ return this.fileLinkResourceService.collection(key);+ }++ return this.fileLinkResourceService.requireCollection(key);+ }),tap((fileLinks) => {if (isNewResource(this.resource)) {this.resource.fileLinks = { elements: fileLinks.map((a) => a._links?.self) };