In 20.05, if a library has more than 20 macros, then they will not appear on the screen and will not be accessible to the cataloger. The current workaround, upping the value in this system preference, RESTdefaultPageSize - increased to 40, this will display the rest of the macros (over 20) for the library.
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