BE: Add notes on user record to note claim outcome

Description

Purpose: A patron's history with claim returned items may affect how the library handles future claims. When a claim is resolved, a note should be made on the patron's record.

Scenarios

  1. Scenario

    • Given an item that is Missing that had been claim returned

    • When viewing the record for the user the claim returned item had been checked out to

    • Then display a note on the user record:

      • Note type: General note

      • Note title: Claimed returned item marked missing

      • Details: Claimed returned item marked missing

        • Link the text "Claimed returned item" to the loan

      • Date: Date that the item was marked missing

  2. Scenario

    • Given an item that is Declared lost that had been claimed returned

    • When viewing the record for the user the claimed returned item had been checked out to

    • Then display a note on the user record:

      • Note type: General note

      • Note title: Claimed returned item marked declared lost

      • Details: Claimed returned item marked declared lost

        • Link the text "Claimed returned item" to the loan

      • Date: Date that the item was marked declared lost

Environment

None

Potential Workaround

None

Attachments

1

Checklist

hide

TestRail: Results

Activity

Show:

Marc JohnsonAugust 27, 2020 at 10:25 AM

Hopefully this is ready for you to review. I've done a little manual testing and notes appear to be created.

Marc JohnsonAugust 26, 2020 at 1:49 PM

I resolved the first issue with the note not being created, however during manual testing I discovered another issue with the implementation.

The way that the reference UI find notes means that there has to be a link between the user and the note and the note must be in the users domain, the notes created in this process are currently assigned the loans domain and so are not found.

I'm putting this back into In progress until this is resolved, apologies :-/

(For technical folks, maybe , this is because the reference UI uses the following query for finding notes - https://folio-snapshot-stable-okapi.dev.folio.org/note-links/domain/users/type/user/id/48a3115d-d476-4582-b6a8-55c09eed7ec7?limit=100000&status=assigned)

Marc JohnsonAugust 25, 2020 at 4:47 PM

Thanks for reporting this issue. I think I've found the cause and have submitted a fix for code review.

Emma BoettcherAugust 24, 2020 at 3:37 PM

Tried to mark as missing/declare lost to test this, but got the following error:

Despite the error, mark as missing will succeed, though declare lost will not. Neither interaction produces a note, though, so I put this story back in progress.

Emma BoettcherAugust 10, 2020 at 12:47 PM

Right.

Done

Details

Assignee

Reporter

Priority

Story Points

Sprint

Development Team

Prokopovych

Fix versions

TestRail: Cases

Open TestRail: Cases

TestRail: Runs

Open TestRail: Runs

Created April 29, 2020 at 1:13 PM
Updated September 18, 2020 at 1:53 PM
Resolved August 27, 2020 at 5:49 PM
TestRail: Cases
TestRail: Runs