Details
-
Bug
-
Status: Closed (View Workflow)
-
P3
-
Resolution: Done
-
12.1.0, 12.2.0
-
ACQ Sprint 127
-
1
-
Thunderjet
-
Lotus R1 2022
Description
Purpose/Overview:
With simple order line queries such as
/orders/order-lines?query=paymentStatus==Open
mod-orders will try to use poLine.acqUnitIds, which does not exist.
This warning will be visible in mod-orders-storage:
WARNING: Doing LIKE search without index for po_line.jsonb->>'acqUnitIds', CQL >>> SQL: acqUnitId
{{ s <> [] >>> lower(f_unaccent(po_line.jsonb->>'acqUnitIds')) NOT LIKE lower(f_unaccent('[]'))}}
The issue is in AcquisitionsUnitsService#buildAcqUnitsCqlExprToSearchRecords. The tableAlias argument is not used when an empty list of ids is retrieved.
The issue was introduced in Juniper by MODORDERS-504.
Consequences of the issue:
- All matching order lines are returned for a query of a user who is not associated with any acquisition unit, even order lines of an order with an acquisition unit.
Potential slowdown of all order line queries
Requirements/Scope:
Fix buildAcqUnitsCqlExprToSearchRecords.
Approach:
Include tableAlias into NO_ACQ_UNIT_ASSIGNED_CQL.
Acceptance criteria:
Check that a user who is not allowed to see an order line because of acquisition units is indeed not seeing it when doing a query for po lines. Also make sure no warning is visible in mod-orders-storage after fixing.
TestRail: Results
Attachments
Issue Links
- blocks
-
MODORDERS-612 MODORDERS (mod-orders) R3 2021 Bugfix release
-
- Closed
-
- defines
-
UXPROD-3221 Thunderjet - Lotus Enhancements/Bugfixes
-
- Closed
-
- relates to
-
MODORDERS-256 Restrict search/view of PO, POL, Piece records based upon acquisitions unit
-
- Closed
-
-
MODORDERS-504 Add GET PO lines cross index search support
-
- Closed
-