openlibhums / openlibhums/janeway
Add new event signals when metadata is edited
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 238
- Forks
- 97
- Avg merge
- 9d 1h
- Merged PRs (30d)
- 8
Description
Is your feature request related to a problem? Please describe.
Some Janeway plugins need to send updates to different metadata aggregators when the underlying metadata in Janeway is altered (e.g. DOAJ Transporter). This at the moment requires the user to know what metadata edits require firing what requests.
Describe the solution you'd like
An event should be raised when the journal and/or article metadata is edited.
Journal edits should include certain metadata related settings, so we would require changing those from "general" settings into "metadata" settings.
For article edits we could raise the event from either a post-save signal on the article model or from the EditArticleMetadata form itself, but there are also other related models that need to raise the event such as Issue, FrozenAuthor or Identifier.
Additional context
There are some performance considerations to take into account, especially when multiple events need to be raised (e.g. editing a large issue). In those cases we may want to raise a different event (e.g. article_metadata_changed_bulk) so that event listeners can better optimize their behaviour.
Another possible optimization would be to pass to the event listener a list of models and fields that have changed, so that listeners can further optimise their behaviour.
Finally, we should look into either passing this messages asynchronously (celery?), or implement deferrable event actions that are run by another process (CRON?) so that a response can be returned to the user without having to wait for the listeners to complete their work.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the article model, EditArticleMetadata form, Issue, FrozenAuthor, Identifier, and journal settings mentioned in the issue. Define which metadata edits emit events, including bulk edits, and document the event payload and completion criteria before implementing or evaluating asynchronous handling.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100