Skip to content

Commit

Permalink
Ramsons release 3.3.1 (#422)
Browse files Browse the repository at this point in the history
* MODINREACH-457 Making systemUserService class as optional and refactored code (#416)

* MODINREACH-457 Making systemUserService class as optional in TenantScopedExecutionService and refactored code

* MODINREACH-457 Adding test case

* MODINREACH-457 Making systemUserService class as optional in TenantScopedExecutionService

* MODINREACH-457 Remove InnReachFolioExecutionContextBuilder.java

* MODINREACH-461 Matching Users with space in their first or last name (#418)

* MODINREACH-461 Matching Users with a space in their first or last name to fix innreach login issue

* MODINREACH-461 Matching Users with a space in their first or last name to fix innreach login issue

* MODINREACH-461 changes made as per the review comments

* Fixing failed Karate test case. (#419)

Co-authored-by: Vignesh <[email protected]>

* MODINREACH-447- Update permissions in MD file. (#412)

* Update News

* [maven-release-plugin] prepare release v3.3.1

* [maven-release-plugin] prepare for next development iteration

---------

Co-authored-by: Gurleen Kaur <[email protected]>
  • Loading branch information
Vignesh-kalyanasundaram and gurleenkaurbp authored Nov 20, 2024
1 parent 187250b commit 7e8b8c4
Show file tree
Hide file tree
Showing 17 changed files with 365 additions and 307 deletions.
10 changes: 10 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
## v3.3.1 2024-11-20

### Stories
* [MODINREACH-447](https://folio-org.atlassian.net/browse/MODINREACH-447) - Review and cleanup Module Descriptors for mod-inn-reach

### Bugs
* [MODINREACH-457](https://folio-org.atlassian.net/browse/MODINREACH-457) - mod-inn-reach constantly crashes on the Eureka platform
* [MODINREACH-461](https://folio-org.atlassian.net/browse/MODINREACH-461) - INN-Reach Login Issue (Users with a space in their first or last name can't log in)
* [FAT-17334](https://folio-org.atlassian.net/browse/FAT-17334) - Fixing failed Karate test case.

## v3.3.0 2024-10-30

### Stories
Expand Down
132 changes: 119 additions & 13 deletions descriptors/ModuleDescriptor-template.json
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@
{
"methods": ["GET"],
"pathPattern": "/inn-reach/central-servers/{centralServerId}/libraries/{libraryId}/locations/location-mappings",
"permissionsRequired": ["inn-reach.location-mappings.collection.get"]
"permissionsRequired": ["inn-reach.location-mappings.libraries.collection.get"]
},
{
"methods": ["GET"],
Expand Down Expand Up @@ -421,15 +421,15 @@
{
"methods": ["POST"],
"pathPattern": "/inn-reach/transactions/{id}/receive-item/{servicePointId}",
"permissionsRequired": ["inn-reach.d2ir.inn-reach-transaction.item.post"],
"permissionsRequired": ["inn-reach.d2ir.inn-reach-transaction.item-receive.post"],
"modulePermissions": [
"circulation.check-in-by-barcode.post"
]
},
{
"methods": ["POST"],
"pathPattern": "/inn-reach/transactions/{id}/receive-unshipped-item/{servicePointId}/{itemBarcode}",
"permissionsRequired": ["inn-reach.d2ir.inn-reach-transaction.item.post"],
"permissionsRequired": ["inn-reach.d2ir.inn-reach-transaction.receive-unshipped-item.post"],
"modulePermissions": [
"circulation.check-in-by-barcode.post",
"inventory.items.collection.get",
Expand All @@ -440,15 +440,15 @@
{
"methods": ["POST"],
"pathPattern": "/inn-reach/transactions/{itemBarcode}/check-out-item/{servicePointId}",
"permissionsRequired": ["inn-reach.d2ir.inn-reach-transaction.item.post"],
"permissionsRequired": ["inn-reach.d2ir.inn-reach-transaction.check-out-item.post"],
"modulePermissions": [
"circulation.check-out-by-barcode.post"
]
},
{
"methods": ["POST"],
"pathPattern": "/inn-reach/transactions/{id}/patronhold/check-out-item/{servicePointId}",
"permissionsRequired": ["inn-reach.d2ir.inn-reach-transaction.item.post"],
"permissionsRequired": ["inn-reach.d2ir.inn-reach-transaction.patron.check-out-item.post"],
"modulePermissions": [
"circulation.check-out-by-barcode.post",
"circulation.loans.collection.get"
Expand All @@ -457,7 +457,7 @@
{
"methods": ["POST"],
"pathPattern": "/inn-reach/transactions/{id}/localhold/check-out-item/{servicePointId}",
"permissionsRequired": ["inn-reach.d2ir.inn-reach-transaction.item.post"],
"permissionsRequired": ["inn-reach.d2ir.inn-reach-transaction.localhold.check-out-item.post"],
"modulePermissions": [
"circulation.check-out-by-barcode.post",
"circulation.loans.collection.get",
Expand All @@ -467,7 +467,7 @@
{
"methods": ["POST"],
"pathPattern": "/inn-reach/transactions/{id}/patronhold/cancel",
"permissionsRequired": ["inn-reach.d2ir.inn-reach-transaction.item.post"],
"permissionsRequired": ["inn-reach.d2ir.inn-reach-transaction.patron-hold.cancel.post"],
"modulePermissions": [
"inventory.items.item.get",
"circulation.requests.item.get",
Expand All @@ -477,7 +477,7 @@
{
"methods": ["POST"],
"pathPattern": "/inn-reach/transactions/{id}/itemhold/cancel",
"permissionsRequired": ["inn-reach.d2ir.inn-reach-transaction.item.post"],
"permissionsRequired": ["inn-reach.d2ir.inn-reach-transaction.item-hold.cancel.post"],
"modulePermissions": [
"circulation.requests.item.get",
"circulation.requests.item.put"
Expand All @@ -486,7 +486,7 @@
{
"methods": ["POST"],
"pathPattern": "/inn-reach/transactions/{id}/localhold/cancel",
"permissionsRequired": ["inn-reach.d2ir.inn-reach-transaction.item.post"],
"permissionsRequired": ["inn-reach.d2ir.inn-reach-transaction.localhold.cancel.post"],
"modulePermissions": [
"circulation.requests.item.get",
"circulation.requests.item.put",
Expand All @@ -496,7 +496,7 @@
{
"methods": ["POST"],
"pathPattern": "/inn-reach/transactions/{id}/itemhold/recall",
"permissionsRequired": ["inn-reach.d2ir.inn-reach-transaction.item.post"],
"permissionsRequired": ["inn-reach.d2ir.inn-reach-transaction.item-hold.recall.post"],
"modulePermissions": [
"circulation.requests.item.get",
"circulation.requests.item.post",
Expand All @@ -508,7 +508,7 @@
{
"methods": ["POST"],
"pathPattern": "/inn-reach/transactions/{id}/patronhold/return-item/{servicePointId}",
"permissionsRequired": ["inn-reach.d2ir.inn-reach-transaction.item.post"],
"permissionsRequired": ["inn-reach.d2ir.inn-reach-transaction.patron-hold.return-item.post"],
"modulePermissions": [
"circulation.requests.item.get",
"circulation.loans.item.get",
Expand All @@ -518,7 +518,7 @@
{
"methods": ["POST"],
"pathPattern": "/inn-reach/transactions/{id}/itemhold/finalcheckin/{servicePointId}",
"permissionsRequired": ["inn-reach.d2ir.inn-reach-transaction.item.post"],
"permissionsRequired": ["inn-reach.d2ir.inn-reach-transaction.item-hold.final-checkin.post"],
"modulePermissions": [
"circulation.loans.item.get",
"circulation.check-in-by-barcode.post"
Expand Down Expand Up @@ -568,6 +568,9 @@
"methods": ["POST"],
"pathPattern": "/inn-reach/transactions/{id}/localhold/transfer-item/{itemId}",
"permissionsRequired": [
"inn-reach.transactions.transfer-item.post"
],
"modulePermissions": [
"inventory.items.item.get",
"circulation.requests.item.get",
"circulation.requests.item.move.post"
Expand Down Expand Up @@ -803,6 +806,11 @@
"displayName" : "get a collection of inn reach location mapping entries",
"description" : "Get a collection of inn reach location mapping entries"
},
{
"permissionName" : "inn-reach.location-mappings.libraries.collection.get",
"displayName" : "GET INN-Reach Location Mappings: Libraries Collection",
"description" : "GET INN-Reach Location Mappings: Libraries Collection"
},
{
"permissionName" : "inn-reach.location-mappings.collection.put",
"displayName" : "update a collection of inn reach location mapping entries",
Expand All @@ -814,6 +822,7 @@
"description" : "All permissions of inn reach location mappings scope",
"subPermissions" : [
"inn-reach.location-mappings.collection.get",
"inn-reach.location-mappings.libraries.collection.get",
"inn-reach.location-mappings.collection.put"
]
},
Expand Down Expand Up @@ -1034,6 +1043,61 @@
"displayName" : "create/update INN-Reach transaction",
"description" : "Create/update INN-Reach transaction"
},
{
"permissionName" : "inn-reach.d2ir.inn-reach-transaction.receive-unshipped-item.post",
"displayName" : "POST INN-Reach Transaction: Receive Unshipped Item",
"description" : "POST INN-Reach Transaction: Receive Unshipped Item"
},
{
"permissionName" : "inn-reach.d2ir.inn-reach-transaction.check-out-item.post",
"displayName" : "POST INN-Reach Transaction: Check-Out Item",
"description" : "POST INN-Reach Transaction: Check-Out Item"
},
{
"permissionName" : "inn-reach.d2ir.inn-reach-transaction.patron.check-out-item.post",
"displayName" : "POST INN-Reach Transaction: Patron Check-Out Item",
"description" : "POST INN-Reach Transaction: Patron Check-Out Item"
},
{
"permissionName" : "inn-reach.d2ir.inn-reach-transaction.localhold.check-out-item.post",
"displayName" : "POST INN-Reach Transaction: Local Hold Check-Out Item",
"description" : "POST INN-Reach Transaction: Local Hold Check-Out Item"
},
{
"permissionName" : "inn-reach.d2ir.inn-reach-transaction.patron-hold.cancel.post",
"displayName" : "POST INN-Reach Transaction: Cancel Patron Hold",
"description" : "POST INN-Reach Transaction: Cancel Patron Hold"
},
{
"permissionName" : "inn-reach.d2ir.inn-reach-transaction.item-hold.cancel.post",
"displayName" : "POST INN-Reach Transaction: Cancel Item Hold",
"description" : "POST INN-Reach Transaction: Cancel Item Hold"
},
{
"permissionName" : "inn-reach.d2ir.inn-reach-transaction.localhold.cancel.post",
"displayName" : "POST INN-Reach Transaction: Cancel Local Hold",
"description" : "POST INN-Reach Transaction: Cancel Local Hold"
},
{
"permissionName" : "inn-reach.d2ir.inn-reach-transaction.item-hold.recall.post",
"displayName" : "POST INN-Reach Transaction: Recall Item Hold",
"description" : "POST INN-Reach Transaction: Recall Item Hold"
},
{
"permissionName" : "inn-reach.d2ir.inn-reach-transaction.patron-hold.return-item.post",
"displayName" : "POST INN-Reach Transaction: Return Patron Hold Item",
"description" : "POST INN-Reach Transaction: Return Patron Hold Item"
},
{
"permissionName" : "inn-reach.d2ir.inn-reach-transaction.item-hold.final-checkin.post",
"displayName" : "POST INN-Reach Transaction: Final Check-In for Item Hold",
"description" : "POST INN-Reach Transaction: Final Check-In for Item Hold"
},
{
"permissionName" : "inn-reach.inn-reach-transaction.item.get",
"displayName" : "get INN-Reach Transaction with transaction hold by id",
"description" : "Get INN-Reach Transaction with transaction hold by id"
},
{
"permissionName" : "inn-reach.inn-reach-transaction.item.get",
"displayName" : "get INN-Reach Transaction with transaction hold by id",
Expand All @@ -1044,12 +1108,48 @@
"displayName" : "update INN-Reach Transaction",
"description" : "Update INN-Reach Transaction"
},
{
"permissionName" : "inn-reach.d2ir.inn-reach-transaction.item-receive.post",
"displayName" : "POST INN-Reach Transaction: Receive Item",
"description" : "POST INN-Reach Transaction: Receive Item"
},
{
"permissionName" : "inn-reach.central-servers.paging-slip-template.item.get",
"displayName" : "GET INN-Reach Central Servers: Item Paging Slip Template",
"description" : "GET INN-Reach Central Servers: Item Paging Slip Template"
},
{
"permissionName" : "inn-reach.central-servers.paging-slip-template.item.get",
"displayName" : "PUT INN-Reach Central Servers: Update Item Paging Slip Template",
"description" : "PUT INN-Reach Central Servers: Update Item Paging Slip Template"
},
{
"permissionName" : "inn-reach.paging-slips.collection.get",
"displayName" : "GET INN-Reach Paging Slips Collection",
"description" : "GET INN-Reach Paging Slips Collection"
},
{
"permissionName" : "inn-reach.central-servers.paging-slip-template.item.put",
"displayName" : "PUT INN-Reach Central Servers: Item Paging Slip Template",
"description" : "PUT INN-Reach Central Servers: Item Paging Slip Template"
},
{
"permissionName" : "inn-reach.d2ir.inn-reach-transaction.all",
"displayName" : "inn reach API module - all permissions of inn-reach transactions",
"description" : "All permissions of inn-reach transactions scope",
"subPermissions" : [
"inn-reach.d2ir.inn-reach-transaction.item.post",
"inn-reach.d2ir.inn-reach-transaction.item-receive.post",
"inn-reach.d2ir.inn-reach-transaction.receive-unshipped-item.post",
"inn-reach.d2ir.inn-reach-transaction.check-out-item.post",
"inn-reach.d2ir.inn-reach-transaction.patron.check-out-item.post",
"inn-reach.d2ir.inn-reach-transaction.localhold.check-out-item.post",
"inn-reach.d2ir.inn-reach-transaction.patron-hold.cancel.post",
"inn-reach.d2ir.inn-reach-transaction.item-hold.cancel.post",
"inn-reach.d2ir.inn-reach-transaction.localhold.cancel.post",
"inn-reach.d2ir.inn-reach-transaction.item-hold.recall.post",
"inn-reach.d2ir.inn-reach-transaction.patron-hold.return-item.post",
"inn-reach.d2ir.inn-reach-transaction.item-hold.final-checkin.post",
"inn-reach.inn-reach-transaction.item.get"
]
},
Expand Down Expand Up @@ -1115,7 +1215,8 @@
"description" : "All permissions of inn-reach transactions scope",
"subPermissions" : [
"inn-reach.inn-reach-transactions.collection.get",
"inn-reach.inn-reach-transaction.item.put"
"inn-reach.inn-reach-transaction.item.put",
"inn-reach.transactions.transfer-item.post"
]
},
{
Expand Down Expand Up @@ -1176,6 +1277,11 @@
"displayName" : "update visible patron field configuration",
"description" : "Update Visible Patron Field Configuration"
},
{
"permissionName" : "inn-reach.transactions.transfer-item.post",
"displayName" : "update visible patron field configuration",
"description" : "Update Visible Patron Field Configuration"
},
{
"permissionName" : "inn-reach.central-servers.visible-patron-field-configuration.all",
"displayName" : "inn reach API module - all permissions of visible patron field configuration",
Expand Down
23 changes: 22 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</parent>
<groupId>org.folio</groupId>
<artifactId>mod-inn-reach</artifactId>
<version>3.3.1-SNAPSHOT</version>
<version>3.3.2-SNAPSHOT</version>
<name>mod-inn-reach</name>
<description>Access to INN-Reach service</description>

Expand Down Expand Up @@ -41,6 +41,7 @@
<!-- plugins -->
<openapi-generator.version>7.9.0</openapi-generator.version>
<copy-rename-maven-plugin.version>1.0.1</copy-rename-maven-plugin.version>
<folio-module-descriptor-validator.version>1.0.0</folio-module-descriptor-validator.version>
<build-helper-maven-plugin.version>3.6.0</build-helper-maven-plugin.version>
<maven-surefire-plugin.version>3.5.1</maven-surefire-plugin.version>
<maven-release-plugin.version>3.1.1</maven-release-plugin.version>
Expand Down Expand Up @@ -481,6 +482,18 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.folio</groupId>
<artifactId>folio-module-descriptor-validator</artifactId>
<version>${folio-module-descriptor-validator.version}</version>
<executions>
<execution>
<goals>
<goal>validate</goal>
</goals>
</execution>
</executions>
</plugin>

</plugins>
</build>
Expand All @@ -500,6 +513,14 @@
</repository>
</repositories>

<pluginRepositories>
<pluginRepository>
<id>folio-nexus</id>
<name>FOLIO Maven repository</name>
<url>https://repository.folio.org/repository/maven-folio</url>
</pluginRepository>
</pluginRepositories>

<distributionManagement>
<repository>
<id>folio-nexus</id>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@
import lombok.RequiredArgsConstructor;
import lombok.extern.log4j.Log4j2;
import org.folio.innreach.domain.entity.OngoingContributionStatus;
import org.folio.innreach.domain.service.impl.InnReachFolioExecutionContextBuilder;
import org.folio.spring.scope.FolioExecutionContextSetter;
import org.folio.innreach.external.exception.InnReachConnectionException;
import org.folio.innreach.external.exception.ServiceSuspendedException;
import org.folio.innreach.batch.contribution.InitialContributionJobConsumerContainer;
Expand Down Expand Up @@ -72,8 +70,6 @@ public class ContributionJobRunner {
private final Statistics stats = new Statistics();

private static final List<UUID> runningInitialContributions = Collections.synchronizedList(new ArrayList<>());
private final InnReachFolioExecutionContextBuilder folioExecutionContextBuilder;

private static Map<String,Integer> totalRecords = new HashMap<>();
private static ConcurrentHashMap<String, Integer> recordsProcessed = new ConcurrentHashMap<>();
private final OngoingContributionStatusService ongoingContributionStatusService;
Expand Down Expand Up @@ -388,13 +384,6 @@ public void runItemDeContribution(UUID centralServerId, Instance instance, Item
}
}

public void cancelJobs() {
log.debug("cancelJobs:: Cancelling unfinished contributions");
try (var context = new FolioExecutionContextSetter(folioExecutionContextBuilder.withUserId(folioContext,null))) {
contributionService.cancelAll();
runningInitialContributions.clear();
}
}

public void cancelInitialContribution(UUID contributionId) {
log.info("Cancelling initial contribution job {}", contributionId);
Expand Down
Loading

0 comments on commit 7e8b8c4

Please sign in to comment.