|
Description
Andrew Fuerste-Henry
2025-09-18 19:47:10 UTC
Created attachment 188587 [details] [review] Bug 40841: DB changes Created attachment 188588 [details] [review] Bug 40841: Add Z39.50 library limits This patch adds the library limits mixin to the Z39.50 classes following a well established pattern in Koha. Created attachment 188589 [details] [review] Bug 40841: DBIC schema [DO NOT PUSH] Patch from commit 56ac99b Created attachment 188590 [details] [review] Bug 40841: Add limits configuration UI This patch adds branch limits selection to the Z30.50/SRU configuration page. Created attachment 188591 [details] [review] Bug 40841: Implement library limits on Z39.50 searches This patchset implements Z39.50/SRU limits by branch in Koha. Key implementation notes: - Follows Koha's established pattern for library limits - A new table linking to library limits is added - The admin UI is adjusted so the form includes library limit selection - Z39.50/SRU search controllers use the `search_with_library_limits` methods to correctly constraint the offered servers. To test: 1. Apply this patches 2. Run: $ ktd --shell k$ updatedatabase => SUCCESS: Database upgrade goes well 3. Re-run: k$ updatedatabase => SUCCESS: No explosions, DB update idempotent 4. Restart everything: k$ restart_all 5. POint your browser to the admin page: http://kohadev-intra.localhost/cgi-bin/koha/admin/z3950servers.pl => SUCCESS: A new column is displayed for library limits brief 6. Edit `LIBRARY OF CONGRESS` => SUCCESS: The form includes the usual library limit selection UI 7. Choose some branches, excluding your current one (KTD's default is 'Centerville'). 8. Save => SUCCESS: It is saved correctly => SUCCESS: The table shows the edited library has the library limits set 9. Edit again => SUCCESS: The selected limits are preserved when editing 10. Pick some authorities Z39.50 target, and exclude your current branch for testing purposes. 11. Go to Cataloguing, and choose 'New from Z39.50/SRU' => SUCCESS: Limits are respected! 12. Go to Authorities, and choose 'New from Z39.50/SRU' => SUCCESS: Limits are respected! 13. Sign off :-D This explodes when attempting to add a new z30.50 or SRU server. Also, these limits should apply in the advanced editor. Created attachment 188597 [details] [review] Obsoletes: 188587 - Bug 40841: DB changes Created attachment 188598 [details] [review] Bug 40841: Add Z39.50 library limits This patch adds the library limits mixin to the Z39.50 classes following a well established pattern in Koha. Created attachment 188599 [details] [review] Bug 40841: DBIC schema [DO NOT PUSH] Patch from commit c86690d Created attachment 188600 [details] [review] Bug 40841: Add limits configuration UI This patch adds branch limits selection to the Z30.50/SRU configuration page. Created attachment 188601 [details] [review] Bug 40841: Implement library limits on Z39.50 searches This patchset implements Z39.50/SRU limits by branch in Koha. Key implementation notes: - Follows Koha's established pattern for library limits - A new table linking to library limits is added - The admin UI is adjusted so the form includes library limit selection - Z39.50/SRU search controllers use the `search_with_library_limits` methods to correctly constraint the offered servers. To test: 1. Apply this patches 2. Run: $ ktd --shell k$ updatedatabase => SUCCESS: Database upgrade goes well 3. Re-run: k$ updatedatabase => SUCCESS: No explosions, DB update idempotent 4. Restart everything: k$ restart_all 5. POint your browser to the admin page: http://kohadev-intra.localhost/cgi-bin/koha/admin/z3950servers.pl => SUCCESS: A new column is displayed for library limits brief 6. Edit `LIBRARY OF CONGRESS` => SUCCESS: The form includes the usual library limit selection UI 7. Choose some branches, excluding your current one (KTD's default is 'Centerville'). 8. Save => SUCCESS: It is saved correctly => SUCCESS: The table shows the edited library has the library limits set 9. Edit again => SUCCESS: The selected limits are preserved when editing 10. Pick some authorities Z39.50 target, and exclude your current branch for testing purposes. 11. Go to Cataloguing, and choose 'New from Z39.50/SRU' => SUCCESS: Limits are respected! 12. Go to Authorities, and choose 'New from Z39.50/SRU' => SUCCESS: Limits are respected! 13. Sign off :-D Andrew, (In reply to Andrew Fuerste-Henry from comment #6) > This explodes when attempting to add a new z30.50 or SRU server. => solved! > Also, these limits should apply in the advanced editor. => solved! Also noticed the advanced editor didn't allow using SRU servers! Fixed on a separate bug so it can be backported and made this dependent on it! Created attachment 188602 [details] [review] Bug 40841: DB changes Created attachment 188603 [details] [review] Bug 40841: Add Z39.50 library limits This patch adds the library limits mixin to the Z39.50 classes following a well established pattern in Koha. Created attachment 188604 [details] [review] Bug 40841: DBIC schema [DO NOT PUSH] Patch from commit c86690d Created attachment 188605 [details] [review] Bug 40841: Add limits configuration UI This patch adds branch limits selection to the Z30.50/SRU configuration page. Created attachment 188606 [details] [review] Bug 40841: Implement library limits on Z39.50 searches This patchset implements Z39.50/SRU limits by branch in Koha. Key implementation notes: - Follows Koha's established pattern for library limits - A new table linking to library limits is added - The admin UI is adjusted so the form includes library limit selection - Z39.50/SRU search controllers use the `search_with_library_limits` methods to correctly constraint the offered servers. To test: 1. Apply this patches 2. Run: $ ktd --shell k$ updatedatabase => SUCCESS: Database upgrade goes well 3. Re-run: k$ updatedatabase => SUCCESS: No explosions, DB update idempotent 4. Restart everything: k$ restart_all 5. POint your browser to the admin page: http://kohadev-intra.localhost/cgi-bin/koha/admin/z3950servers.pl => SUCCESS: A new column is displayed for library limits brief 6. Edit `LIBRARY OF CONGRESS` => SUCCESS: The form includes the usual library limit selection UI 7. Choose some branches, excluding your current one (KTD's default is 'Centerville'). 8. Save => SUCCESS: It is saved correctly => SUCCESS: The table shows the edited library has the library limits set 9. Edit again => SUCCESS: The selected limits are preserved when editing 10. Pick some authorities Z39.50 target, and exclude your current branch for testing purposes. 11. Go to Cataloguing, and choose 'New from Z39.50/SRU' => SUCCESS: Limits are respected! 12. Go to Authorities, and choose 'New from Z39.50/SRU' => SUCCESS: Limits are respected! 13. Sign off :-D The patches no longer apply 8-(... git bz apply 40841 Bug 40841 - Limit z39.50 targets to specific branches 188602 - Bug 40841: DB changes 188603 - Bug 40841: Add Z39.50 library limits 188604 - Bug 40841: DBIC schema [DO NOT PUSH] 188605 - Bug 40841: Add limits configuration UI 188606 - Bug 40841: Implement library limits on Z39.50 searches Apply? [(y)es, (n)o, (i)nteractive] y Applying: Bug 40841: DB changes Applying: Bug 40841: Add Z39.50 library limits Applying: Bug 40841: DBIC schema [DO NOT PUSH] Applying: Bug 40841: Add limits configuration UI Applying: Bug 40841: Implement library limits on Z39.50 searches Using index info to reconstruct a base tree... M cataloguing/editor.pl Falling back to patching base and 3-way merge... Auto-merging cataloguing/editor.pl CONFLICT (content): Merge conflict in cataloguing/editor.pl error: Failed to merge in the changes. Patch failed at 0001 Bug 40841: Implement library limits on Z39.50 searches Created attachment 189497 [details] [review] Bug 40841: DB changes Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io> Created attachment 189498 [details] [review] Bug 40841: Add Z39.50 library limits This patch adds the library limits mixin to the Z39.50 classes following a well established pattern in Koha. Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io> Created attachment 189499 [details] [review] Bug 40841: DBIC schema [DO NOT PUSH] Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io> Created attachment 189500 [details] [review] Bug 40841: Add limits configuration UI This patch adds branch limits selection to the Z30.50/SRU configuration page. Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io> Created attachment 189501 [details] [review] Bug 40841: Implement library limits on Z39.50 searches This patchset implements Z39.50/SRU limits by branch in Koha. Key implementation notes: - Follows Koha's established pattern for library limits - A new table linking to library limits is added - The admin UI is adjusted so the form includes library limit selection - Z39.50/SRU search controllers use the `search_with_library_limits` methods to correctly constraint the offered servers. To test: 1. Apply this patches 2. Run: $ ktd --shell k$ updatedatabase => SUCCESS: Database upgrade goes well 3. Re-run: k$ updatedatabase => SUCCESS: No explosions, DB update idempotent 4. Restart everything: k$ restart_all 5. POint your browser to the admin page: http://kohadev-intra.localhost/cgi-bin/koha/admin/z3950servers.pl => SUCCESS: A new column is displayed for library limits brief 6. Edit `LIBRARY OF CONGRESS` => SUCCESS: The form includes the usual library limit selection UI 7. Choose some branches, excluding your current one (KTD's default is 'Centerville'). 8. Save => SUCCESS: It is saved correctly => SUCCESS: The table shows the edited library has the library limits set 9. Edit again => SUCCESS: The selected limits are preserved when editing 10. Pick some authorities Z39.50 target, and exclude your current branch for testing purposes. 11. Go to Cataloguing, and choose 'New from Z39.50/SRU' => SUCCESS: Limits are respected! 12. Go to Authorities, and choose 'New from Z39.50/SRU' => SUCCESS: Limits are respected! 13. Same as 11 but with the advanced editor => SUCCESS: Limits are respected! 14. Sign off :-D Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io> Created attachment 189521 [details] [review] Bug 40841: DB changes Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io> Signed-off-by: David Nind <david@davidnind.com> Created attachment 189522 [details] [review] Bug 40841: Add Z39.50 library limits This patch adds the library limits mixin to the Z39.50 classes following a well established pattern in Koha. Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io> Signed-off-by: David Nind <david@davidnind.com> Created attachment 189523 [details] [review] Bug 40841: DBIC schema [DO NOT PUSH] Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io> Signed-off-by: David Nind <david@davidnind.com> Created attachment 189524 [details] [review] Bug 40841: Add limits configuration UI This patch adds branch limits selection to the Z30.50/SRU configuration page. Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io> Signed-off-by: David Nind <david@davidnind.com> Created attachment 189525 [details] [review] Bug 40841: Implement library limits on Z39.50 searches This patchset implements Z39.50/SRU limits by branch in Koha. Key implementation notes: - Follows Koha's established pattern for library limits - A new table linking to library limits is added - The admin UI is adjusted so the form includes library limit selection - Z39.50/SRU search controllers use the `search_with_library_limits` methods to correctly constraint the offered servers. To test: 1. Apply this patches 2. Run: $ ktd --shell k$ updatedatabase => SUCCESS: Database upgrade goes well 3. Re-run: k$ updatedatabase => SUCCESS: No explosions, DB update idempotent 4. Restart everything: k$ restart_all 5. POint your browser to the admin page: http://kohadev-intra.localhost/cgi-bin/koha/admin/z3950servers.pl => SUCCESS: A new column is displayed for library limits brief 6. Edit `LIBRARY OF CONGRESS` => SUCCESS: The form includes the usual library limit selection UI 7. Choose some branches, excluding your current one (KTD's default is 'Centerville'). 8. Save => SUCCESS: It is saved correctly => SUCCESS: The table shows the edited library has the library limits set 9. Edit again => SUCCESS: The selected limits are preserved when editing 10. Pick some authorities Z39.50 target, and exclude your current branch for testing purposes. 11. Go to Cataloguing, and choose 'New from Z39.50/SRU' => SUCCESS: Limits are respected! 12. Go to Authorities, and choose 'New from Z39.50/SRU' => SUCCESS: Limits are respected! 13. Same as 11 but with the advanced editor => SUCCESS: Limits are respected! 14. Sign off :-D Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io> Signed-off-by: David Nind <david@davidnind.com> The only thing I noted was that some areas where the libraries limitation is set, the Select2 dropdown list is used. For example, patron categories. |