Link update report: Create endpoint for fetching links stats (Authority)

Description

Purpose/Overview:

Needs to support reporting that allows catalogers to know about updates on linked Bibliographic fields and Authorities over a period of time. The module will consume statistics of instance-authority links updates and provide an endpoint for fetching this data.

Requirements/Scope:

  1. A new API interface created `links-statistics`

  2. Endpoint GET /links/authority/stats created

  3. Default sort by updated date

  4. Endpoint parameters supported:
    ||parameter name||values||
    |limit|integer (default 100)|
    |fromDate|date-time (inclusive, optional)|
    |toDate|date-time (inclusive, optional)|

      4. Response:

Approach:

  1. Make a request to a database with parameters and `limit + 1`

  2. In response return the `limit` number of records and fill `next` with the limit+1 record date-time.

  3. Make sure that updated date is indexed

Acceptance criteria:

  • Endpoint created

  • Covered by unit tests

  • Karate tests are created/updated

  • Module documentation updated

  • Logging is well-defined

Environment

None

Potential Workaround

None

CSP Request Details

None

CSP Rejection Details

None

Attachments

10

Checklist

hide

TestRail: Results

Activity

Show:

Yauhen Viazau February 21, 2023 at 8:40 AM

Verified on Snapshot-1 environment - 1 issue persists

Please see attached screencasts:

  •  

Issue:   (Response includes data on updates of already deleted records)

Passing this story to review as the only existing issue will be addressed in scope of

Khasan Sidikov February 15, 2023 at 12:45 PM

Ok, I will be fixing it.

Khalilah Gambrell February 15, 2023 at 12:35 PM

and , we should remove delete records.

Yauhen Viazau February 15, 2023 at 7:17 AM

Tested on Snapshot-1 environment - 1 issue remains

Please see attached screencasts:

  •  

Issue:

  • No "metadata" section with "startedAt", "startedByUserFirstName", "startedByUserLastName", etc.

- Response also shows data on deleted Authority records. I think this is acceptable. Please confirm

Khasan Sidikov February 13, 2023 at 10:42 AM

Checked the code, will be fixing it.

Done

Details

Assignee

Reporter

Priority

Story Points

Sprint

Development Team

Spitfire

Fix versions

Release

Orchid (R1 2023)

TestRail: Cases

Open TestRail: Cases

TestRail: Runs

Open TestRail: Runs

Created January 3, 2023 at 10:09 AM
Updated February 22, 2023 at 9:09 AM
Resolved February 21, 2023 at 11:29 PM
TestRail: Cases
TestRail: Runs