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
[31080] Trigger wpEvent after custom action
Oliver Güntheraad1dfea9b3b
diff --git a/frontend/src/app/components/wp-custom-actions/wp-custom-actions/wp-custom-action.component.ts b/frontend/src/app/components/wp-custom-actions/wp-custom-actions/wp-custom-action.component.tsindex 3cff1406521..1d4d64af804 100644--- a/frontend/src/app/components/wp-custom-actions/wp-custom-actions/wp-custom-action.component.ts+++ b/frontend/src/app/components/wp-custom-actions/wp-custom-actions/wp-custom-action.component.ts@@ -37,6 +37,7 @@ import {WorkPackagesActivityService} from 'core-components/wp-single-view-tabs/aimport {IWorkPackageEditingServiceToken} from "core-components/wp-edit-form/work-package-editing.service.interface";import {WorkPackageEditingService} from "core-components/wp-edit-form/work-package-editing-service";import {SchemaCacheService} from "core-components/schemas/schema-cache.service";+import {WorkPackageEventsService} from "core-app/modules/work_packages/events/work-package-events.service";@Component({selector: 'wp-custom-action',@@ -52,6 +53,7 @@ export class WpCustomActionComponent {private wpSchemaCacheService:SchemaCacheService,private wpActivity:WorkPackagesActivityService,private wpNotificationsService:WorkPackageNotificationService,+ private wpEvents:WorkPackageEventsService,@Inject(IWorkPackageEditingServiceToken) protected wpEditing:WorkPackageEditingService) {}private fetchAction() {@@ -83,6 +85,7 @@ export class WpCustomActionComponent {this.wpSchemaCacheService.ensureLoaded(savedWp).then(() => {this.wpCacheService.updateWorkPackage(savedWp, true);this.wpEditing.stopEditing(savedWp.id!);+ this.wpEvents.push({ type: "updated", id: savedWp.id! });});}).catch((errorResource:any) => {this.wpNotificationsService.handleRawError(errorResource, this.workPackage);