Bugzilla – Attachment 171980 Details for
Bug 26929
Koha will only display the first 20 macros Advanced Editor
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 26929: Fetching macros for Advanced Editor should ignore default pagesize
Bug-26929-Fetching-macros-for-Advanced-Editor-shou.patch (text/plain), 2.24 KB, created by
Lucas Gass (lukeg)
on 2024-09-26 14:46:16 UTC
(
hide
)
Description:
Bug 26929: Fetching macros for Advanced Editor should ignore default pagesize
Filename:
MIME Type:
Creator:
Lucas Gass (lukeg)
Created:
2024-09-26 14:46:16 UTC
Size:
2.24 KB
patch
obsolete
>From 480656d665802c8b7e07064e1785639c47233034 Mon Sep 17 00:00:00 2001 >From: Phil Ringnalda <phil@chetcolibrary.org> >Date: Fri, 13 Sep 2024 16:52:05 -0700 >Subject: [PATCH] Bug 26929: Fetching macros for Advanced Editor should ignore > default pagesize > >The REST API has a default page size of 20, controlled by the preference >RESTdefaultPageSize. That's fine for things that are fetched to display >in pages of 20, but for things like macros in the Advanced Editor that >don't implement paging, it's awkward, since when you create your 21st >macro, it disappears the next time you open the editor. > >The Advanced Editor should instead disable paging by passing the param >_per_page=-1 > >Test plan: > >1. Set the preference EnableAdvancedCatalogingEditor to Enable. While you > are there, set the preference RESTdefaultPageSize to 2, so you don't have > to create 21 macros to see one disappear >2. Cataloging - Advanced editor - Macros >3. Click New macro..., give it the name 1, then repeat for 2 and 3 >4. You have a list of macros open with all three listed, so far so good. > Refresh the browser page and reopen Macros. You now have two macros >5. Apply patch, refresh the page, reopen Macros. You now have three macros >6. You should probably reset that RESTdefaultPageSize back to 20 if you > aren't about to reset ktd > >Sponsored-by: Chetco Community Public Library >Signed-off-by: Olivier V <olivier.vezina@inLibro.com> >Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> >--- > koha-tmpl/intranet-tmpl/prog/en/includes/cateditor-ui.inc | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/cateditor-ui.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/cateditor-ui.inc >index 1c5b8b51b81..176f126c0e7 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/cateditor-ui.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/cateditor-ui.inc >@@ -878,7 +878,7 @@ require( [ 'koha-backend', 'search', 'macros', 'marc-editor', 'marc-record', 'pr > $("#macro-toolbar").prepend($convert); > } > let options = { >- url: "/api/v1/advanced_editor/macros/", >+ url: "/api/v1/advanced_editor/macros/?_per_page=-1", > method: "GET", > contentType: "application/json", > }; >-- >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 26929
:
171502
|
171979
| 171980