Updating Copy Status List in Admin

Bug #788763 reported by Tim Spindler
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Evergreen
Fix Released
High
Galen Charlton

Bug Description

Evergreen 2.1 b1
Opensrf 2.0

we cannot update status in client. I went to update it directly in the table and had the following error on the function:

SQL error:

ERROR: syntax error at or near "AND"
LINE 32: AND cp.status = 17;
             ^
QUERY:
            INSERT INTO asset.opac_visible_copies (copy_id, circ_lib, record)
              SELECT id, circ_lib, record FROM (
                SELECT cp.id, cp.circ_lib, cn.record, cn.id AS call_number
                  FROM asset.copy cp
                        JOIN asset.call_number cn ON (cn.id = cp.call_number)
                        JOIN actor.org_unit a ON (cp.circ_lib = a.id)
                        JOIN asset.copy_location cl ON (cp.location = cl.id)
                        JOIN config.copy_status cs ON (cp.status = cs.id)
                        JOIN biblio.record_entry b ON (cn.record = b.id)
                  WHERE NOT cp.deleted
                        AND NOT cn.deleted
                        AND NOT b.deleted
                        AND cs.opac_visible
                        AND cl.opac_visible
                        AND cp.opac_visible
                        AND a.opac_visible
                            UNION
                SELECT cp.id, cp.circ_lib, pbcm.peer_record AS record, NULL AS call_number
                  FROM asset.copy cp
                        JOIN biblio.peer_bib_copy_map pbcm ON (pbcm.target_copy = cp.id)
                        JOIN actor.org_unit a ON (cp.circ_lib = a.id)
                        JOIN asset.copy_location cl ON (cp.location = cl.id)
                        JOIN config.copy_status cs ON (cp.status = cs.id)
                  WHERE NOT cp.deleted
                        AND cs.opac_visible
                        AND cl.opac_visible
                        AND cp.opac_visible
                        AND a.opac_visible
                    ) AS x

    AND cp.status = 17;
CONTEXT: PL/pgSQL function "cache_copy_visibility" line 177 at EXECUTE statement
In statement:
update copy_status set holdable=true, opac_visible=true where id=17

Galen Charlton (gmc)
Changed in evergreen:
milestone: none → 2.1-rc1
assignee: nobody → Galen Charlton (gmc)
importance: Undecided → Low
importance: Low → High
status: New → In Progress
Revision history for this message
Galen Charlton (gmc) wrote :

Push fix written by Thomas Berezansky.

Changed in evergreen:
status: In Progress → Fix Committed
Ben Shum (bshum)
Changed in evergreen:
status: Fix Committed → Fix Released
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.