Skip to content

Conversation

@JakobMiesner
Copy link
Contributor

  • Implement an endpoint to expose Order statistics, which returns a histogram for stats where requested metrics are grouped by and aggregated
  • Extend the orders index with a new stats object
  • The stats object contains order_processing_time and document_request_waiting_time

closes: CERNDocumentServer/cds-ils#1034

@JakobMiesner JakobMiesner force-pushed the feature/stats/orders branch 7 times, most recently from 2c15aac to 176300b Compare January 6, 2026 12:16
@JakobMiesner JakobMiesner marked this pull request as ready for review January 6, 2026 12:19
_VALID_DATE_INTERVALS = {"1d", "1w", "1M", "1q", "1y"}


def validate_field_name(field_name):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this function reused somewhere outside the SecureFieldName?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right. Moved it inside SecureFieldName

* the endpoint returns a histogram for stats where requested metrics are grouped by and aggregated
* extend the orders index with a new stats object
* the stats object contains order_processing_time and document_request_waiting_time
* validation should be handled by passing the validate param, not in the deserialization
Copy link
Contributor

@kpsherva kpsherva left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

re-reviewed, LGTM!

@kpsherva kpsherva merged commit 80df670 into inveniosoftware:master Jan 8, 2026
5 checks passed
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.

Library Statistics - 7. Purchase orders

2 participants