MARCcat: MARC Bibliographic records (UXPROD-786)

[MODCAT-108] It's not possible to see authority record for subject starting from a Browse function Created: 21/May/19  Updated: 14/Jun/20  Resolved: 24/May/19

Status: Closed
Project: mod-marccat
Components: None
Affects versions: None
Fix versions: None
Parent: MARCcat: MARC Bibliographic records

Type: Bug Priority: P3
Reporter: Annalisa Di Sabato Assignee: Mirko Fonzo
Resolution: Done Votes: 0
Labels: Authority_record, browse_heading, marccat
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original estimate: Not Specified

Attachments: PNG File screenshot-1.png    
Issue links:
Defines
defines UXPROD-1456 Browse heading and display of cross r... Closed
Sprint:
Development Team: @cult
Epic Link: MARCcat: MARC Bibliographic records

 Description   

In MARCcat browsing "Subject: All: "Atti persecutori", the system will display the heading with one authority record, ten bibliographic records and two cross reference. Clicking on that heading to see the authority and bibliographic record in the third panel, the system doesn't display the authority record (I see message "Non associated Authority record"), but only the bibliographic records.

It seems that it the index SK used to find authority record for subject is not working.

Follow the SQL produced by the BE during the search:

CCL => "SK 95691" became "select res.aut_nbr from (select distinct smtc.aut_nbr from ((select distinct aut.aut_nbr from aut where (aut.hdg_nbr IN 95691 AND aut.hdg_typ_cde='SH'))) smtc order by smtc.aut_nbr desc ) res limit 30 offset 0"
org.postgresql.util.PSQLException: ERROR: syntax error at or near "95691"
Position: 122

To find the wrong query on DB do the following select in table S_BIB1_SMNTC:

select sql_whr from S_BIB1_SMNTC where ATRBT_USE_NBR = 21 and qry_nbr = 427



 Comments   
Comment by Mirko Fonzo [ 21/May/19 ]

The problem depends on wrong settings into the Semantic Table S_BIB1_SMNTC for some records. SQL Where Conditions such as "aut.hdg_nbr IN 95691" are accepted by Oracle but not by Postgres, which requires brackets even if just one element is specified. So, the condition should be "aut.hdg_nbr IN (95691)".
I've detected 53 different entry points into the Semantic Table affected by the same issue. I've fixed them on database folio_marccat_test1.
I've also added the fixing into the database patch currently under development.

Comment by Annalisa Di Sabato [ 24/May/19 ]

Verified in MARCcat. It's solved.

Generated at Fri Feb 09 00:18:04 UTC 2024 using Jira 1001.0.0-SNAPSHOT#100246-sha1:7a5c50119eb0633d306e14180817ddef5e80c75d.