Bugzilla – Attachment 169096 Details for
Bug 37368
Patron searches break when surname and firstname are set to NULL
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 37368: Add 'library' to patron search embed
Bug-37368-Add-library-to-patron-search-embed.patch (text/plain), 4.35 KB, created by
Lucas Gass (lukeg)
on 2024-07-17 15:53:31 UTC
(
hide
)
Description:
Bug 37368: Add 'library' to patron search embed
Filename:
MIME Type:
Creator:
Lucas Gass (lukeg)
Created:
2024-07-17 15:53:31 UTC
Size:
4.35 KB
patch
obsolete
>From e23e067485d8c715294da7b16434d4aa20bc7ac2 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Wed, 17 Jul 2024 16:43:17 +0100 >Subject: [PATCH] Bug 37368: Add 'library' to patron search embed > >This patch adds the missing library embed from the patron search forms. >This embed is required for the case where a patron is missing both first >and last name or is from a different library group and thus falls into >the 'Patron from library X' block. > >I also update the 'Patron from library X' to 'Patron from X' as I feel >it reads more clearly. > >Finally, we need to sync the available embeds to ensure 'library' is >embeddable from the different endpoints this search can be triggered on. > >Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> >--- > api/v1/swagger/paths/acquisitions_baskets.yaml | 1 + > api/v1/swagger/paths/acquisitions_funds.yaml | 2 ++ > api/v1/swagger/paths/erm_users.yaml | 1 + > api/v1/swagger/paths/suggestions.yaml | 1 + > koha-tmpl/intranet-tmpl/prog/en/includes/js-patron-format.inc | 2 +- > koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc | 2 +- > 6 files changed, 7 insertions(+), 2 deletions(-) > >diff --git a/api/v1/swagger/paths/acquisitions_baskets.yaml b/api/v1/swagger/paths/acquisitions_baskets.yaml >index 0adf26de00..4767ac155e 100644 >--- a/api/v1/swagger/paths/acquisitions_baskets.yaml >+++ b/api/v1/swagger/paths/acquisitions_baskets.yaml >@@ -23,6 +23,7 @@ > type: string > enum: > - extended_attributes >+ - library > collectionFormat: csv > produces: > - application/json >diff --git a/api/v1/swagger/paths/acquisitions_funds.yaml b/api/v1/swagger/paths/acquisitions_funds.yaml >index 174b52d4d4..0aa0f21083 100644 >--- a/api/v1/swagger/paths/acquisitions_funds.yaml >+++ b/api/v1/swagger/paths/acquisitions_funds.yaml >@@ -83,6 +83,7 @@ > type: string > enum: > - extended_attributes >+ - library > collectionFormat: csv > produces: > - application/json >@@ -135,6 +136,7 @@ > type: string > enum: > - extended_attributes >+ - library > collectionFormat: csv > produces: > - application/json >diff --git a/api/v1/swagger/paths/erm_users.yaml b/api/v1/swagger/paths/erm_users.yaml >index 2798062416..ad559198de 100644 >--- a/api/v1/swagger/paths/erm_users.yaml >+++ b/api/v1/swagger/paths/erm_users.yaml >@@ -23,6 +23,7 @@ > type: string > enum: > - extended_attributes >+ - library > collectionFormat: csv > produces: > - application/json >diff --git a/api/v1/swagger/paths/suggestions.yaml b/api/v1/swagger/paths/suggestions.yaml >index 6e500bcf4c..278f340f16 100644 >--- a/api/v1/swagger/paths/suggestions.yaml >+++ b/api/v1/swagger/paths/suggestions.yaml >@@ -254,6 +254,7 @@ > type: string > enum: > - extended_attributes >+ - library > collectionFormat: csv > produces: > - application/json >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/js-patron-format.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/js-patron-format.inc >index ae27dd09ba..69b472d97b 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/js-patron-format.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/js-patron-format.inc >@@ -37,7 +37,7 @@ > } > > if ( name.replace(' ', '').length == 0 ) { >- return _("A patron from library %s".format(patron.library.name)); >+ return _("A patron from %s".format(patron.library.name)); > } > > if ( config && config.hide_patron_name ) { >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc >index c8dd64c124..99902efebc 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc >@@ -381,7 +381,7 @@ > [% default_sort_column = "name" %] > [% END %] > [% SET order_column_index = 0 %] >- [% SET embed = ['extended_attributes'] %] >+ [% SET embed = ['extended_attributes','library'] %] > patrons_table = $("#[% table_id | html %]").kohaTable({ > "ajax": { > "url": patron_search_url, >-- >2.39.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 37368
:
169030
|
169032
|
169093
|
169095
|
169096
|
169106