Summary: | Koha will only display the first 20 macros Advanced Editor | ||
---|---|---|---|
Product: | Koha | Reporter: | Kelly McElligott <kelly> |
Component: | Cataloging | Assignee: | Phil Ringnalda <phil> |
Status: | Pushed to stable --- | QA Contact: | Lucas Gass (lukeg) <lucas> |
Severity: | normal | ||
Priority: | P5 - low | CC: | andrew, flyingendpaper, kyle, lucas, m.de.rooy, ovezina, phil |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Trivial patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: |
24.11.00,24.05.06
|
|
Circulation function: | |||
Bug Depends on: | 17268 | ||
Bug Blocks: | |||
Attachments: |
Bug 26929: Fetching macros for Advanced Editor should ignore default pagesize
Bug 26929: Fetching macros for Advanced Editor should ignore default pagesize Bug 26929: Fetching macros for Advanced Editor should ignore default pagesize |
Description
Kelly McElligott
2020-11-04 20:04:37 UTC
Created attachment 171502 [details] [review] 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 Created attachment 171979 [details] [review] 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> Created attachment 171980 [details] [review] 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> Thanks for all the hard work! Pushed to main for the next 24.11.00 release as RM Assistant Backported to 24.05.x for upcoming 24.05.06 |