Skip to content

Commit

Permalink
CIRC-2148: added lastPrintRequester in removeRelatedRecordInformation…
Browse files Browse the repository at this point in the history
… for update request, reverted some permissions, added new printDetails fields in request.json
  • Loading branch information
kapil-epam committed Sep 13, 2024
1 parent b2d0ba8 commit f7534b9
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 8 deletions.
4 changes: 1 addition & 3 deletions descriptors/ModuleDescriptor-template.json
Original file line number Diff line number Diff line change
Expand Up @@ -2065,9 +2065,7 @@
"users.collection.get",
"addresstypes.collection.get",
"usergroups.collection.get",
"usergroups.item.get",
"print-events-storage.print-events-status.item.post",
"circulation-storage.circulation-settings.collection.get"
"usergroups.item.get"
],
"visible": false
},
Expand Down
8 changes: 5 additions & 3 deletions ramls/examples/request.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,13 @@
"pickupServicePointName": "Circ Desk 1"
},
"printDetails": {
"count": 4,
"lastPrintedDate": "2024-07-29T11:54:07.000Z",
"printCount": 32,
"requesterId": "21457ab5-4635-4e56-906a-908f05e9233b",
"isPrinted": true,
"printEventDate": "2024-09-13T06:34:16.035+00:00",
"lastPrintRequester": {
"lastName": "lastName",
"firstName": "firstName",
"lastName": "lastName",
"middleName": "middleName"
}
}
Expand Down
14 changes: 12 additions & 2 deletions ramls/request.json
Original file line number Diff line number Diff line change
Expand Up @@ -363,12 +363,22 @@
"type": "object",
"readonly": true,
"properties": {
"count": {
"printCount": {
"description": "Total no of times the request is printed",
"type": "integer",
"readOnly": true
},
"lastPrintedDate": {
"requesterId": {
"description": "User uuid of last print requester",
"type": "string",
"readOnly": true
},
"isPrinted": {
"description": "Whether the request is ever printed",
"type": "boolean",
"readOnly": true
},
"printEventDate": {
"description": "Recent printed time of the request",
"type": "string",
"format": "date-time",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -578,6 +578,12 @@ private Request removeRelatedRecordInformation(Request request) {
representation.remove("pickupServicePoint");
representation.remove("deliveryAddress");

JsonObject printDetails = representation.getJsonObject("printDetails");
if (printDetails != null && printDetails.containsKey("lastPrintRequester")) {
printDetails.remove("lastPrintRequester");
}


return request;
}

Expand Down

0 comments on commit f7534b9

Please sign in to comment.