searching for purchase orders using line item detail attributes can fail

Bug #1575767 reported by Galen Charlton
36
This bug affects 7 people
Affects Status Importance Assigned to Milestone
Evergreen
Won't Fix
Medium
Galen Charlton
3.4
Won't Fix
Undecided
Unassigned
3.5
Won't Fix
Undecided
Unassigned
3.6
Won't Fix
Undecided
Unassigned

Bug Description

Consider an acquisitions search that looks like this:

record type to retrieve: purchase orders
search filter: LID - Fund = /a valid fund/

Attempting a search like this will result in a DATABASE_QUERY_FAILED. Under the hood, the query passed to open-ils.cstore.json_query.atomic would be:

{"from":{"acqpo":{"acqlid":{"type":"inner"}}},"order_by":{"acqpo":{"id":{}}},"limit":15,"select":{"acqpo":[{"transform":"distinct","column":"id"}]},"offset":0,"where":{"-and":[{"+acqlid":{"fund":"457"}}]}}

However, this fails with a "Unable to construct JOIN clause(s)" exception as there is no direct join between acqpo and acqlid. The expected result would returning POs that have line item details that use the selected fund, adding a join on jub.

Evergreen 2.7 (also confirmed in 2.10)

Tags: acq search
Galen Charlton (gmc)
tags: added: acq
Changed in evergreen:
importance: Undecided → Medium
Revision history for this message
Erica Rohlfs (erohlfs) wrote :

I set the importance at Medium, because this is affecting the user's ability to successfully search POs based on the fund.

Changed in evergreen:
status: New → Confirmed
tags: added: search
Galen Charlton (gmc)
Changed in evergreen:
assignee: nobody → Galen Charlton (gmc)
Revision history for this message
Tiffany Little (tslittle) wrote :

Noting that I no longer see this bug happening in the new Acq Search in 3.6.

Changed in evergreen:
status: Confirmed → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.