Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add duration field to circulation events #27

Merged
merged 1 commit into from
Mar 25, 2024

Conversation

ttuovinen
Copy link
Contributor

@ttuovinen ttuovinen commented Mar 25, 2024

Description

This PR adds duration field to circulation events (database, OpenSearch, S3). It is used to store loan duration times (in seconds) to loan revoke events.

This adds new duration field to circulationevent model and OpenSearch event index. OpenSearch mapping change is a small addition and it is done in lightweight ad-hoc manner as currently we don't have flow for migrating from mapping version to another.

Loan durations cannot be added retroactively to the existing events since we didn't have this data earlier.

Motivation and Context

Loan duration enables filtering out short loans from analytics (https://jira.lingsoft.fi/browse/SIMPLYE-181). This implementation will be its own PR.

How Has This Been Tested?

I tested the local analytics events and OpenSearch events with Palace Bookshelf open access books and revoke events have correct durations in seconds stored in them.

NOTE: S3 events have not been tested. Currently they are not used in E-kirjasto.

@ttuovinen ttuovinen merged commit 1ace1d3 into main Mar 25, 2024
24 checks passed
@ttuovinen ttuovinen deleted the feature/simplye-181/add-loan-duration-to-events branch March 25, 2024 10:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants