Bug 36396 - Link facet with authorised value category
Summary: Link facet with authorised value category
Status: Signed Off
Alias: None
Product: Koha
Classification: Unclassified
Component: Searching - Elasticsearch (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Jonathan Druart
QA Contact:
URL:
Keywords:
Depends on: 35138
Blocks: 36398
  Show dependency treegraph
 
Reported: 2024-03-22 09:13 UTC by Jonathan Druart
Modified: 2024-04-22 13:26 UTC (History)
3 users (show)

See Also:
Change sponsored?: Sponsored
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 36396: DB changes (1.91 KB, patch)
2024-03-22 10:36 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 36396: DBIC schema changes (1.58 KB, patch)
2024-03-22 10:36 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 36396: Link facet with authorised value category - ES (11.03 KB, patch)
2024-03-22 10:36 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 36396: Prevent link to av for 'specials' (3.45 KB, patch)
2024-03-22 10:36 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 36396: UI - OPAC (5.40 KB, patch)
2024-03-22 10:36 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 36396: Export/import the yaml config (2.50 KB, patch)
2024-03-22 10:36 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 36396: (follow-up) Prevent link to av for 'specials' (1.95 KB, patch)
2024-03-22 13:37 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 36396: DB changes (1.96 KB, patch)
2024-03-25 10:10 UTC, Lukas Koszyk
Details | Diff | Splinter Review
Bug 36396: DBIC schema changes (1.63 KB, patch)
2024-03-25 10:10 UTC, Lukas Koszyk
Details | Diff | Splinter Review
Bug 36396: Link facet with authorised value category - ES (11.07 KB, patch)
2024-03-25 10:10 UTC, Lukas Koszyk
Details | Diff | Splinter Review
Bug 36396: Prevent link to av for 'specials' (3.49 KB, patch)
2024-03-25 10:10 UTC, Lukas Koszyk
Details | Diff | Splinter Review
Bug 36396: UI - OPAC (5.45 KB, patch)
2024-03-25 10:10 UTC, Lukas Koszyk
Details | Diff | Splinter Review
Bug 36396: Export/import the yaml config (2.55 KB, patch)
2024-03-25 10:10 UTC, Lukas Koszyk
Details | Diff | Splinter Review
Bug 36396: (follow-up) Prevent link to av for 'specials' (2.00 KB, patch)
2024-03-25 10:10 UTC, Lukas Koszyk
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Druart 2024-03-22 09:13:52 UTC
In order to display descriptions instead of codes we will add a link to an authorised value category.
Comment 1 Jonathan Druart 2024-03-22 10:36:08 UTC
Created attachment 163685 [details] [review]
Bug 36396: DB changes

Add the new DB column search_field.authorised_value_category

Sponsored-by: The Research University in the Helmholtz Association (KIT)
Comment 2 Jonathan Druart 2024-03-22 10:36:10 UTC
Created attachment 163686 [details] [review]
Bug 36396: DBIC schema changes

Sponsored-by: The Research University in the Helmholtz Association (KIT)
Comment 3 Jonathan Druart 2024-03-22 10:36:13 UTC
Created attachment 163687 [details] [review]
Bug 36396: Link facet with authorised value category - ES

This new feature adds the ability to link an ES facet to an authorised
value category, in order to display a description instead of the code.

Test plan:
1. Go to the ES mapping admin page
2. Notice the new "Authorized value category" column in the facets
   config table
3. Create a new facet that is linked to a search field containing values
   from an authorised value category. Pick this category in the list
4. Save
5. Reindex
6. Notice that the descriptions are now displayed (staff and OPAC) in
   the search result page.

QA: See the related bug report for possible improvements. It's not
easy at all to deal with the "specials" here, a lot of changes must be
done in how we fetch/cache the AVs.

Sponsored-by: The Research University in the Helmholtz Association (KIT)
Comment 4 Jonathan Druart 2024-03-22 10:36:15 UTC
Created attachment 163688 [details] [review]
Bug 36396: Prevent link to av for 'specials'

See previous commit message, 'QA' part.
We do not support the "specials" categories.

Sponsored-by: The Research University in the Helmholtz Association (KIT)
Comment 5 Jonathan Druart 2024-03-22 10:36:17 UTC
Created attachment 163689 [details] [review]
Bug 36396: UI - OPAC

Sponsored-by: The Research University in the Helmholtz Association (KIT)
Comment 6 Jonathan Druart 2024-03-22 10:36:19 UTC
Created attachment 163690 [details] [review]
Bug 36396: Export/import the yaml config

Test plan:
Export the ES fields/mappings using
 misc/search_tools/export_elasticsearch_mappings.pl > mappings.yaml
Copy this file to admin/searchengine/elasticsearch/mappings.yaml

Reset the mapping from the UI
Notice that the links to the AV categories have been preserved

Sponsored-by: The Research University in the Helmholtz Association (KIT)
Comment 7 Michaela Sieber 2024-03-22 13:31:26 UTC
Thanks Jonathan!

Just a very small thing:
 When adding a new line to the facets config table 'Facet order' it is not possible to leave the authorised value category empty. You first have to add the line and save, afterwards you can change the authorised value category to be empty.
Comment 8 Jonathan Druart 2024-03-22 13:37:35 UTC
Created attachment 163705 [details] [review]
Bug 36396: (follow-up) Prevent link to av for 'specials'
Comment 9 Jonathan Druart 2024-03-22 13:38:20 UTC
(In reply to Michaela Sieber from comment #7)
> Thanks Jonathan!
> 
> Just a very small thing:
>  When adding a new line to the facets config table 'Facet order' it is not
> possible to leave the authorised value category empty. You first have to add
> the line and save, afterwards you can change the authorised value category
> to be empty.

Indeed, thanks! Should be fixed now.
Comment 10 Lukas Koszyk 2024-03-25 10:10:42 UTC
Created attachment 163776 [details] [review]
Bug 36396: DB changes

Add the new DB column search_field.authorised_value_category

Sponsored-by: Karlsruhe Institute of Technology (KIT)
Signed-off-by: Lukas Koszyk <lukasz.koszyk@kit.edu>
Comment 11 Lukas Koszyk 2024-03-25 10:10:44 UTC
Created attachment 163777 [details] [review]
Bug 36396: DBIC schema changes

Sponsored-by: The Research University in the Helmholtz Association (KIT)
Signed-off-by: Lukas Koszyk <lukasz.koszyk@kit.edu>
Comment 12 Lukas Koszyk 2024-03-25 10:10:47 UTC
Created attachment 163778 [details] [review]
Bug 36396: Link facet with authorised value category - ES

This new feature adds the ability to link an ES facet to an authorised
value category, in order to display a description instead of the code.

Test plan:
1. Go to the ES mapping admin page
2. Notice the new "Authorized value category" column in the facets
   config table
3. Create a new facet that is linked to a search field containing values
   from an authorised value category. Pick this category in the list
4. Save
5. Reindex
6. Notice that the descriptions are now displayed (staff and OPAC) in
   the search result page.

QA: See the related bug report for possible improvements. It's not
easy at all to deal with the "specials" here, a lot of changes must be
done in how we fetch/cache the AVs.

Sponsored-by: The Research University in the Helmholtz Association (KIT)
Signed-off-by: Lukas Koszyk <lukasz.koszyk@kit.edu>
Comment 13 Lukas Koszyk 2024-03-25 10:10:49 UTC
Created attachment 163779 [details] [review]
Bug 36396: Prevent link to av for 'specials'

See previous commit message, 'QA' part.
We do not support the "specials" categories.

Sponsored-by: The Research University in the Helmholtz Association (KIT)
Signed-off-by: Lukas Koszyk <lukasz.koszyk@kit.edu>
Comment 14 Lukas Koszyk 2024-03-25 10:10:51 UTC
Created attachment 163780 [details] [review]
Bug 36396: UI - OPAC

Sponsored-by: The Research University in the Helmholtz Association (KIT)
Signed-off-by: Lukas Koszyk <lukasz.koszyk@kit.edu>
Comment 15 Lukas Koszyk 2024-03-25 10:10:53 UTC
Created attachment 163781 [details] [review]
Bug 36396: Export/import the yaml config

Test plan:
Export the ES fields/mappings using
 misc/search_tools/export_elasticsearch_mappings.pl > mappings.yaml
Copy this file to admin/searchengine/elasticsearch/mappings.yaml

Reset the mapping from the UI
Notice that the links to the AV categories have been preserved

Sponsored-by: The Research University in the Helmholtz Association (KIT)
Signed-off-by: Lukas Koszyk <lukasz.koszyk@kit.edu>
Comment 16 Lukas Koszyk 2024-03-25 10:10:56 UTC
Created attachment 163782 [details] [review]
Bug 36396: (follow-up) Prevent link to av for 'specials'

Signed-off-by: Lukas Koszyk <lukasz.koszyk@kit.edu>