Skip to content

Commit

Permalink
UISACQCOMP-114 Filtering for tags not working if tag contains forward…
Browse files Browse the repository at this point in the history
… slash (#632)
  • Loading branch information
usavkov-epam committed Aug 8, 2022
1 parent 5f12b02 commit 5f41c64
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## (IN PROGRESS)

* PO/L does not save/open when deviating from the default electronic inventory interactions. Refs UIOR-999.
* Filtering for tags not working if tag contains forward slash. Refs UISACQCOMP-114.

## [3.2.1](https://github.com/folio-org/stripes-acq-components/tree/v3.2.1) (2022-07-27)
[Full Changelog](https://github.com/folio-org/stripes-acq-components/compare/v3.2.0...v3.2.1)
Expand Down
4 changes: 2 additions & 2 deletions lib/AcqList/utils/queryUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ import {

export const buildArrayFieldQuery = (filterKey, filterValue) => {
if (Array.isArray(filterValue)) {
return `${filterKey}==(${filterValue.map(v => `*"${v}"*`).join(' or ')})`;
return `${filterKey}==(${filterValue.map(v => `"*${v}*"`).join(' or ')})`;
}

if (filterValue === emptyArrayFilterValue) {
return `${filterKey}==${filterValue}`;
}

return `${filterKey}==${`*"${filterValue}"*`}`;
return `${filterKey}==${`"*${filterValue}*"`}`;
};

export const buildDateRangeQuery = (filterKey, filterValue) => {
Expand Down

0 comments on commit 5f41c64

Please sign in to comment.