Bug 11745

Summary: Only one "TOPICS" value shown for 650a
Product: Koha Reporter: David White <dswhite42>
Component: CatalogingAssignee: Galen Charlton <gmcharlt>
Status: CLOSED INVALID QA Contact: Testopia <testopia>
Severity: normal    
Priority: P3 CC: m.de.rooy
Version: 3.14   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:

Description David White 2014-02-12 04:55:47 UTC
In my "authorised_values" table, I have the following rows with a "category" of "TOPICS":
    Biography
    Children
    History
    Music
    Science
For each of these rows, the "lib" value is NULL.

However when I go to Intranet -> Cataloging -> New Record -> Default framework, go to the "6" tab and look at 650a ("Topical term..."), the dropdown box contains only a single value, "Biography"

Looking at the SQL that generates this dropdown, I see this:

  SELECT authorised_value, lib
  FROM authorised_values
  LEFT JOIN authorised_values_branches ON ( id = av_id )
  WHERE category = 'TOPICS'
  AND ( branchcode = 'NO_LIBRARY_SET' OR branchcode IS NULL )
  GROUP BY lib
  ORDER BY lib, lib_opac

My "authorised_values_branches" table is empty.  (This is a database upgrade from 3.00.00.070, and nothing during the installation process populated that table).  The result of that SQL commmand is to just return the first value ("Biography")

If I remove the "GROUP BY lib" clause, then all TOPICS values will populate the 650a dropdown.  (My original Koha 3.00.00.070 did not include that "GROUP BY" clause in addbiblio.pl)   

Is this a bug in addbiblio.pl?  Or a problem related to the upgrade from 3.00.00.070 -> 3.14.02.000 ?
Comment 1 Owen Leonard 2016-06-23 14:10:33 UTC
I cannot reproduce this problem in master.