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

Pass the prepareAttachment URL for the existing grid

Oliver Günther6a4e4f7bc0fe
diff --git a/frontend/src/app/shared/components/grids/widgets/custom-text/custom-text-edit-field.service.ts b/frontend/src/app/shared/components/grids/widgets/custom-text/custom-text-edit-field.service.ts
index 777d4933701..278ac4e42c3 100644
--- a/frontend/src/app/shared/components/grids/widgets/custom-text/custom-text-edit-field.service.ts
+++ b/frontend/src/app/shared/components/grids/widgets/custom-text/custom-text-edit-field.service.ts
@@ -10,6 +10,7 @@ import { SchemaCacheService } from 'core-app/core/schemas/schema-cache.service';
import { UploadFile } from 'core-app/core/file-upload/op-file-upload.service';
import { ICKEditorContext } from 'core-app/shared/components/editor/components/ckeditor/ckeditor.types';
import { HalResource } from 'core-app/features/hal/resources/hal-resource';
+import { GridResource } from 'core-app/features/hal/resources/grid-resource';
@Injectable()
export class CustomTextEditFieldService extends EditFieldHandler {
@@ -138,6 +139,7 @@ export class CustomTextEditFieldService extends EditFieldHandler {
*/
private initializeChangeset(value:GridWidgetResource) {
const schemaHref = 'customtext-schema';
+ const grid:GridResource = value.grid;
const resourceSource = {
text: value.options.text,
getEditorContext: () => ({
@@ -146,7 +148,8 @@ export class CustomTextEditFieldService extends EditFieldHandler {
} as ICKEditorContext),
canAddAttachments: value.grid.canAddAttachments as boolean,
_links: {
- attachments: (value.grid as HalResource).attachments as { href?:string },
+ attachments: grid.attachments as { href?:string },
+ prepareAttachment: grid.prepareAttachment as { href?:string },
schema: {
href: schemaHref,
},