Skip to content

Commit

Permalink
Merge branch 'master' into ecs-tlr
Browse files Browse the repository at this point in the history
  • Loading branch information
alexanderkurash committed Oct 22, 2024
2 parents 0718fe1 + 157527c commit e9ec479
Show file tree
Hide file tree
Showing 9 changed files with 55 additions and 23 deletions.
22 changes: 22 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
## v2.0.0

* MODDCB-129: Upgrade "holdings-storage" to 8.0
* * MODDCB-134 Use new permissions instead source-storage.records.ge

## v1.1.5 2024-10-03

* MODDCB-114: Supplier side: Unable to produce service point pickup location in pick lists
* MODDCB-119: Add DCB calendar and assignment of SPs to it
* MODDCB-130: DCB Patron barcode issue

## v1.1.4 2024-10-02

* MODDCB-114: Supplier side: Unable to produce service point pickup location in pick lists
* MODDCB-119: Add DCB calendar and assignment of SPs to it
* MODDCB-130: DCB Patron barcode issue

## v1.1.3 2024-10-02

* MODDCB-114: Supplier side: Unable to produce service point pickup location in pick lists
* MODDCB-119: Add DCB calendar and assignment of SPs to it

## v1.1.2 2024-08-07

* MODDCB-112: Kafka TLS configuration is not present
Expand Down
17 changes: 9 additions & 8 deletions descriptors/ModuleDescriptor-template.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
},
{
"id": "inventory",
"version": "13.1"
"version": "14.0"
},
{
"id": "login",
Expand All @@ -28,7 +28,7 @@
},
{
"id": "holdings-storage",
"version": "6.0 7.0"
"version": "6.0 7.0 8.0"
},
{
"id": "service-points",
Expand All @@ -38,10 +38,6 @@
"id": "circulation-item",
"version": "1.0"
},
{
"id": "inventory",
"version": "13.1"
},
{
"id": "material-types",
"version": "2.2"
Expand Down Expand Up @@ -278,7 +274,12 @@
"inventory.instances.item.get",
"users.collection.get",
"users.item.get",
"source-storage.records.get",
"source-storage.stream.marc-record-identifiers.collection.post",
"source-storage.records.collection.get",
"source-storage.records.item.get",
"source-storage.records.formatted.item.get",
"source-storage.stream.records.collection.get",
"source-storage.records.matching.collection.post",
"circulation.requests.item.get",
"circulation.requests.item.post",
"circulation.requests.collection.get",
Expand All @@ -296,7 +297,7 @@
"dockerPull": false,
"dockerArgs": {
"HostConfig": {
"Memory": 357913941,
"Memory": 702293850,
"PortBindings": { "8081/tcp": [ { "HostPort": "%p" } ] }
}
},
Expand Down
9 changes: 7 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<groupId>org.folio</groupId>
<artifactId>mod-dcb</artifactId>
<name>mod-dcb</name>
<version>1.1.3-SNAPSHOT</version>
<version>2.0.0-SNAPSHOT</version>
<description>Manage DCB related transactions in folio</description>
<packaging>jar</packaging>

Expand All @@ -27,6 +27,7 @@
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<rest-assured.version>5.1.1</rest-assured.version>
<mvn-failsafe.version>3.2.1</mvn-failsafe.version>
<folio-util.version>35.2.0</folio-util.version>
<argLine />

<!-- runtime dependencies -->
Expand Down Expand Up @@ -193,7 +194,11 @@
<artifactId>log4j-slf4j2-impl</artifactId>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.folio</groupId>
<artifactId>util</artifactId>
<version>${folio-util.version}</version>
</dependency>
</dependencies>

<build>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -298,8 +298,8 @@ private void createCalendarIfNotExists() {
log.info("createCalendarIfNotExists:: calendar with name {} doesn't exists, so creating new calendar", DCB_CALENDAR_NAME);
Calendar newCalendar = Calendar.builder()
.name(DCB_CALENDAR_NAME)
.startDate(LocalDate.now())
.endDate(LocalDate.now().plusYears(10))
.startDate(LocalDate.now().toString())
.endDate(LocalDate.now().plusYears(10).toString())
.normalHours(List.of(NormalHours.builder()
.startDay(DayOfWeek.SUNDAY.name())
.startTime(LocalTime.of(0, 0).toString())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import org.folio.dcb.service.PatronGroupService;
import org.folio.dcb.service.UserService;
import org.folio.spring.exception.NotFoundException;
import org.folio.util.StringUtil;
import org.springframework.stereotype.Service;

import java.util.Objects;
Expand Down Expand Up @@ -62,7 +63,7 @@ private User createUser(DcbPatron patronDetails) {
private User fetchUserByBarcodeAndId(String barcode, String id) {
log.debug("fetchUserByBarcodeAndId:: Trying to fetch existing user with barcode {} and id {}",
barcode, id);
return usersClient.fetchUserByBarcodeAndId("barcode==" + barcode + " and id==" + id)
return usersClient.fetchUserByBarcodeAndId("barcode==" + StringUtil.cqlEncode(barcode) + " and id==" + StringUtil.cqlEncode(id))
.getUsers()
.stream()
.findFirst()
Expand Down
7 changes: 6 additions & 1 deletion src/main/resources/permissions/mod-dcb.csv
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,12 @@ inventory.items.item.get
inventory.instances.item.get
users.collection.get
users.item.get
source-storage.records.get
source-storage.stream.marc-record-identifiers.collection.post
source-storage.records.collection.get
source-storage.records.item.get
source-storage.records.formatted.item.get
source-storage.stream.records.collection.get
source-storage.records.matching.collection.post
circulation.requests.item.get
circulation.requests.item.post
circulation.requests.collection.get
Expand Down
2 changes: 0 additions & 2 deletions src/main/resources/swagger.api/schemas/Calendar.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,9 @@ Calendar:
type: string
startDate:
type: string
format: date
description: The first effective date (inclusive, YYYY-MM-DD) of this calendar
endDate:
type: string
format: date
description: The first effective date (inclusive, YYYY-MM-DD) of this calendar
assignments:
description: A list of all service points that this calendar is assigned to
Expand Down
4 changes: 2 additions & 2 deletions src/test/java/org/folio/dcb/utils/EntityUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -250,8 +250,8 @@ public static TransactionAuditEntity createTransactionAuditEntity(){
public static CalendarCollection getCalendarCollection(String calendarName) {
var calendar = Calendar.builder()
.name(calendarName)
.startDate(LocalDate.now())
.endDate(LocalDate.now().plusYears(10))
.startDate(LocalDate.now().toString())
.endDate(LocalDate.now().plusYears(10).toString())
.assignments(new ArrayList<>())
.build();
var calendarCollection = new CalendarCollection();
Expand Down
10 changes: 5 additions & 5 deletions src/test/resources/mappings/users.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
{
"request": {
"method": "GET",
"url": "/users?query=barcode%3D%3DDCB_PATRON%20and%20id%3D%3D571b0a2c-9456-40b5-a449-d41fe6017082"
"url": "/users?query=barcode%3D%3D%22DCB_PATRON%22%20and%20id%3D%3D%22571b0a2c-9456-40b5-a449-d41fe6017082%22"
},
"response": {
"status": 200,
Expand All @@ -42,7 +42,7 @@
{
"request": {
"method": "GET",
"url": "/users?query=barcode%3D%3DDCB_PATRON%20and%20id%3D%3D284056f5-0670-4e1e-9e2f-61b9f1ee2d18"
"url": "/users?query=barcode%3D%3D%22DCB_PATRON%22%20and%20id%3D%3D%22284056f5-0670-4e1e-9e2f-61b9f1ee2d18%22"
},
"response": {
"status": 200,
Expand All @@ -55,7 +55,7 @@
{
"request": {
"method": "GET",
"url": "/users?query=barcode%3D%3DDCB_PATRON%20and%20id%3D%3D910c512c-ebc5-40c6-96a5-a20bfd81e154"
"url": "/users?query=barcode%3D%3D%22DCB_PATRON%22%20and%20id%3D%3D%22910c512c-ebc5-40c6-96a5-a20bfd81e154%22"
},
"response": {
"status": 200,
Expand All @@ -68,7 +68,7 @@
{
"request": {
"method": "GET",
"url": "/users?query=barcode%3D%3DDCB_PATRON%20and%20id%3D%3Dddd48d19-794b-4ffa-bf1c-cc20aebaf2c9"
"url": "/users?query=barcode%3D%3D%22DCB_PATRON%22%20and%20id%3D%3D%22ddd48d19-794b-4ffa-bf1c-cc20aebaf2c9%22"
},
"response": {
"status": 200,
Expand All @@ -81,7 +81,7 @@
{
"request": {
"method": "GET",
"url": "/users?query=barcode%3D%3DDCB_PATRON%20and%20id%3D%3D18c1741d-e678-4c8e-9fe7-cfaeefab5eea"
"url": "/users?query=barcode%3D%3D%22DCB_PATRON%22%20and%20id%3D%3D%2218c1741d-e678-4c8e-9fe7-cfaeefab5eea%22"
},
"response": {
"status": 200,
Expand Down

0 comments on commit e9ec479

Please sign in to comment.