Skip to content

Commit

Permalink
MODORDERS-962. Update Get titles query to check acq units from title …
Browse files Browse the repository at this point in the history
…instead of purchase order (#799)

* MODORDERS-962. Update Get titles query to check acq units from title instead of purchase order
  • Loading branch information
SerhiiNosko authored Nov 28, 2023
1 parent 2aa224c commit b8555e1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/org/folio/service/titles/TitlesService.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import java.util.Map;
import java.util.function.Function;

import org.apache.commons.lang3.StringUtils;
import org.folio.orders.utils.HelperUtils;
import org.folio.rest.core.RestClient;
import org.folio.rest.core.models.RequestContext;
Expand Down Expand Up @@ -52,7 +53,7 @@ public Future<Title> createTitle(Title title, RequestContext requestContext) {
}

public Future<TitleCollection> getTitles(int limit, int offset, String query, RequestContext requestContext) {
return acquisitionsUnitsService.buildAcqUnitsCqlExprToSearchRecords("purchaseOrder.", requestContext)
return acquisitionsUnitsService.buildAcqUnitsCqlExprToSearchRecords(StringUtils.EMPTY, requestContext)
.compose(acqUnitsCqlExpr -> {
String resultQuery = acqUnitsCqlExpr;
if (!isEmpty(query)) {
Expand Down

0 comments on commit b8555e1

Please sign in to comment.