Page tree
Skip to end of metadata
Go to start of metadata

CIRC-441 - Getting issue details... STATUS

The goal of the spike is to investigate the process of adding new tokens to delivery slips

1. How existing tokens are added to delivery slip:


"POST circulation/check-in-by-barcode" endpoint returns "staffSlipContext" attributes in response:

staffSlipContext
 "staffSlipContext": {
    "item": {
      "title": "Bridget Jones's Baby: the diaries",
      "barcode": "453987605438",
      "status": "In transit",
      "primaryContributor": null,
      "allContributors": "Fielding, Helen",
      "callNumber": "PR6056.I4588 B749 2016",
      "callNumberPrefix": null,
      "callNumberSuffix": null,
      "enumeration": null,
      "volume": null,
      "chronology": null,
      "yearCaption": "",
      "materialType": "book",
      "loanType": "Course reserves",
      "copy": "Copy 1",
      "numberOfPieces": "1",
      "descriptionOfPieces": null,
      "effectiveLocationSpecific": "Main Library",
      "effectiveLocationLibrary": "Datalogisk Institut",
      "effectiveLocationCampus": "City Campus",
      "effectiveLocationInstitution": "Københavns Universitet",
      "fromServicePoint": "Online",
      "toServicePoint": "Circ Desk 1"
    },
    "request": {
      "requestID": "be0355f5-6920-4065-8e4f-619c54de6891",
      "servicePointPickup": "Circ Desk 1"
    },
    "requester": {
      "firstName": "Penelope",
      "lastName": "Feil",
      "middleName": "Myrna",
      "barcode": "109322966933845"
    }
  }

UI uses this object to replace delivery slip tokens with data when printing delivery slip.  

mod-circulation constructs staffSlipContext in method TemplateContextUtil#createCheckInContext by using available data (data is stored in object CheckInProcessRecords).

Before constructing staffSlipContext mod-circulation retrieves all necessary data by making calls to other services in CheckInByBarcodeResource#checkin.

2. How to add new slip tokens

If data for new token is already available in CheckInProcessRecords then we just need to transfer it to staffSlipContext in TemplateContextUtil#createCheckInContext.

If data is not available then we need to retrieve it from corresponding service, store it in CheckInProcessRecords, and then add it to staffSlipContext in TemplateContextUtil#createCheckInContext

  • No labels

3 Comments

  1. Just have a few questions to help with my understanding:
    (1)Is there already specific mappings for these fields in CheckInProcessRecords? - https://github.com/folio-org/mod-circulation/blob/c15d65ce3c587f48e39e2d5c32513d5808d974d8/src/main/java/org/folio/circulation/domain/CheckInProcessRecords.java#L18

    (2)Is there 1 or more services from which we would retrieve the needed data from? (request or requestor details)


  2. Carole Godfrey ,
    (1) For tokens that we need, requester address details are stored in highestPriorityFulfillableRequest.requester.personal.address

    request.deliveryAddressType is not stored anywhere, but there is highestPriorityFulfillableRequest.deliveryAddressTypeId, that we can use to get address type.

    (2) address details are already retrieved from mod-users, and we need to additionally retrieve addressType from mod-users

Write a comment…