Open asmecher opened 4 months ago
We had previously relied on the act of publishing (e.g. Repo::publication()->publish()
) to indicate that metadata (new or changed) is available for downstream service to consume and used this as a jumping off point. By making it possible to edit this metadata post publication, I propose that we should treat each save event of the metadata as a MetadataChanged
event and make use of the MetadataChanged and BatchMetadataChanged events.
I would propose a naive approach that simply always dispatches the MetadataChanged
event when the form is saved/updated post publication, and let each individual implementation be in charge of deciding what metadata is important to process.
This approach has the advantage of using already existing events and jobs and allows any updates to happen asynchronously to the web request. It is also extensible for any future services or third-party plugins that need to know when metadata has been updated.
Examples of downstream services that would make use of this (either currently implemented or future implementations):
@asmecher Ready for review OJS_main: ojs: pkp/pkp-lib#10263 Relax editing metadata on published/posted materials #4410 pkp/pkp-lib: pkp/pkp-lib#10263 edit metadata post publication #10335 pkp/ui-library: pkp/pkp-lib#10263 Relax editing metadata on published/posted materials #398
Thanks, @Hafsa-Naeem! @Vitaliy-1, would you be able to review this one?
@asmecher @Hafsa-Naeem On ui-library side of things this make sense to apply to the new side modal workflow page. Trying to get that side modal workflow page as default on main branch ASAP.. Its probably 2-4 weeks away.
This is a good change, because journals get stuck and create new versions easily without any good reason (correcting a typo etc.)
Just asking that when we now edit the metadata, is this visible in the editorial history? ie. do we stamp who did what? I think this is important especially after something has been published.
There would be an event in the event log, but if the editor chooses not to create a new version, the change will not be tracked.
Note that we'll be extending versioning further with https://github.com/pkp/pkp-lib/issues/4860 -- description there.
@Hafsa-Naeem Hi Hafsa, I am still active on this codebase, but risk of code conflicts is lot lower as most things are getting settled.
Permission to edit publication is now calculated here - https://github.com/pkp/ui-library/blob/main/src/pages/workflow/composables/useWorkflowPermissions.js#L70 . So that might be only place you need to adjust on frontend.
Let me know if you have any difficulties.
Describe the bug Currently, when content is published/posted in OJS/OMP/OPS, editors are restricted from making further changes:
In practice, however, editors want the ability to tweak/edit metadata in published content. This has led to anti-patterns like unpublish/edit/republish cycles.
In OMP, there is an additional problem, where certain data on Publication Formats can't be accessed/reviewed because the edit links disappear once the content is published.
Accepting that editors are going to want to tweak metadata after publication, we should keep the warning message present, but stop restricting edits. We should trust the editors to understand the implications of making edits, but not try to prevent it.