Here's a quick branch that solves the issue. Best way to test this would be to create three active lineitems for a bib record, cancel one, and mark the second as received. Then make an API call with ['on-order', 'received'] passed in for lineitem_state in our options object. It should retrieve the lineitems that weren't canceled.
http:// git.evergreen- ils.org/ ?p=working/ Evergreen. git;a=shortlog; h=refs/ heads/user/ khuckins/ lp1744762- lineitem- state-filtering -api
Here's a quick branch that solves the issue. Best way to test this would be to create three active lineitems for a bib record, cancel one, and mark the second as received. Then make an API call with ['on-order', 'received'] passed in for lineitem_state in our options object. It should retrieve the lineitems that weren't canceled.