[Bug 41863] New: Facets generated from Authorized values sometimes show empty labels
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41863 Bug ID: 41863 Summary: Facets generated from Authorized values sometimes show empty labels Initiative type: --- Sponsorship Sponsored status: Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: minor Priority: P5 - low Component: Searching - Elasticsearch Assignee: januszop@gmail.com Reporter: januszop@gmail.com QA Contact: testopia@bugs.koha-community.org With facets generated from Authorized values, it may happen that the list of authorized values lacks an entry for a code used in a record. In this case, an empty entry will appear in the facet list, with the number of uses but without any label. It would be desirable to show at least the raw code, rather than an empty label. This makes it easier to see which code has no entry in the respective AV and to either add it or correct an erroneous code. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41863 Janusz Kaczmarek <januszop@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41863 --- Comment #1 from Janusz Kaczmarek <januszop@gmail.com> --- Created attachment 193317 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=193317&action=edit Bug 41863: Facets generated from Authorized values sometimes show empty labels With facets generated from Authorized values, it may happen that the list of authorized values lacks an entry for a code used in a record. In this case, an empty entry will appear in the facet list, with the number of uses but without any label. It would be desirable to show at least the raw code, rather than an empty label. This makes it easier to see which code has no entry in the respective AV and to either add it or correct an erroneous code. Test plan: ========== 1. Have a standard KTD installation with Elasticsearch. 2. Add AV COUNTRY_CODES category and add two pairs (Authorized value, Description): * enk - England * xxu - United States 3. In the admin/searchengine/elasticsearch/mappings.yaml file, correct the definition of the pl search field as follows: pl: - label: pl + facet_order: 24 + label: Publication place mandatory: ~ + authorised_value_category: COUNTRY_CODES mappings: - - facet: '' + - facet: 1 marc_field: 008_/15-17 marc_type: marc21 sort: 1 4. Reindex ES with: koha-elasticsearch --rebuild -r -d -b kohadev 5. Set the displayFacetCount systempreference to 'Show' 6. Perform a general search in the OPAC or staff interface: * View the 'Publication place' facet and notice a dozen empty entries, with only the number of occurrences. 7. Apply the patch ; restart_all 8. Repeat p. 6. You will see country codes that you can now add to AV or correct. BTW, note that the tiny correction to Search.pm is analogous to setting the label for 'special' types (i.e. itype, location, ccode, holdingbranch, homebranch) two lines above. Sponsored-by: Ignatianum University in Cracow -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41863 Roman Dolny <roman.dolny@jezuici.pl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41863 Roman Dolny <roman.dolny@jezuici.pl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #193317|0 |1 is obsolete| | --- Comment #2 from Roman Dolny <roman.dolny@jezuici.pl> --- Created attachment 193328 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=193328&action=edit Bug 41863: Facets generated from Authorized values sometimes show empty labels With facets generated from Authorized values, it may happen that the list of authorized values lacks an entry for a code used in a record. In this case, an empty entry will appear in the facet list, with the number of uses but without any label. It would be desirable to show at least the raw code, rather than an empty label. This makes it easier to see which code has no entry in the respective AV and to either add it or correct an erroneous code. Test plan: ========== 1. Have a standard KTD installation with Elasticsearch. 2. Add AV COUNTRY_CODES category and add two pairs (Authorized value, Description): * enk - England * xxu - United States 3. In the admin/searchengine/elasticsearch/mappings.yaml file, correct the definition of the pl search field as follows: pl: - label: pl + facet_order: 24 + label: Publication place mandatory: ~ + authorised_value_category: COUNTRY_CODES mappings: - - facet: '' + - facet: 1 marc_field: 008_/15-17 marc_type: marc21 sort: 1 4. Reindex ES with: koha-elasticsearch --rebuild -r -d -b kohadev 5. Set the displayFacetCount systempreference to 'Show' 6. Perform a general search in the OPAC or staff interface: * View the 'Publication place' facet and notice a dozen empty entries, with only the number of occurrences. 7. Apply the patch ; restart_all 8. Repeat p. 6. You will see country codes that you can now add to AV or correct. BTW, note that the tiny correction to Search.pm is analogous to setting the label for 'special' types (i.e. itype, location, ccode, holdingbranch, homebranch) two lines above. Sponsored-by: Ignatianum University in Cracow Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41863 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA Patch complexity|--- |Trivial patch Assignee|januszop@gmail.com |m.de.rooy@rijksmuseum.nl -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41863 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #193328|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41863 --- Comment #3 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 197058 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=197058&action=edit Bug 41863: Facets generated from Authorized values sometimes show empty labels With facets generated from Authorized values, it may happen that the list of authorized values lacks an entry for a code used in a record. In this case, an empty entry will appear in the facet list, with the number of uses but without any label. It would be desirable to show at least the raw code, rather than an empty label. This makes it easier to see which code has no entry in the respective AV and to either add it or correct an erroneous code. Test plan: ========== 1. Have a standard KTD installation with Elasticsearch. 2. Add AV COUNTRY_CODES category and add two pairs (Authorized value, Description): * enk - England * xxu - United States 3. In the admin/searchengine/elasticsearch/mappings.yaml file, correct the definition of the pl search field as follows: pl: - label: pl + facet_order: 24 + label: Publication place mandatory: ~ + authorised_value_category: COUNTRY_CODES mappings: - - facet: '' + - facet: 1 marc_field: 008_/15-17 marc_type: marc21 sort: 1 4. Reindex ES with: koha-elasticsearch --rebuild -r -d -b kohadev 5. Set the displayFacetCount systempreference to 'Show' 6. Perform a general search in the OPAC or staff interface: * View the 'Publication place' facet and notice a dozen empty entries, with only the number of occurrences. 7. Apply the patch ; restart_all 8. Repeat p. 6. You will see country codes that you can now add to AV or correct. BTW, note that the tiny correction to Search.pm is analogous to setting the label for 'special' types (i.e. itype, location, ccode, holdingbranch, homebranch) two lines above. Sponsored-by: Ignatianum University in Cracow Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41863 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |m.de.rooy@rijksmuseum.nl |y.org | CC| |m.de.rooy@rijksmuseum.nl Assignee|m.de.rooy@rijksmuseum.nl |januszop@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41863 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |26.05.00 released in| | Status|Passed QA |Pushed to main -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41863 --- Comment #4 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Nice work everyone! Pushed to main for 26.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41863 Jacob O'Mara <jacob.omara@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to main |Pushed to stable Version(s)|26.05.00 |26.05.00,25.11.05 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41863 --- Comment #5 from Jacob O'Mara <jacob.omara@openfifth.co.uk> --- Thanks all, pushed to 25.11.x -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org