[Bug 27184] New: Make the circulation history use the API
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27184 Bug ID: 27184 Summary: Make the circulation history use the API Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Circulation Assignee: koha-bugs@lists.koha-community.org Reporter: black23@gmail.com QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, kyle.m.hall@gmail.com Circulation history of heavy borrowers or anomym accounts can be very long after couple of years, so it takes long time to load them. API pagination can help. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27184 Michal Denar <black23@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |agustinmoyano@theke.io, | |black23@gmail.com, | |frederic@tamil.fr, | |jonathan.druart@bugs.koha-c | |ommunity.org, | |josef.moravec@gmail.com, | |martin.renvoize@ptfs-europe | |.com, rbit@rbit.cz -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27184 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27184 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27184 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |tomascohen@gmail.com |ity.org | Status|NEW |ASSIGNED -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27184 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |andrew@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27184 --- Comment #1 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- Created attachment 212228 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=212228&action=edit Bug 27184: Allow listing a patron's old checkouts through the API This patch adds a `checked_in` query parameter to the GET /patrons/{patron_id}/checkouts route, so the circulation history can be fetched paginated instead of loaded in full by readingrec.pl. The patron is now the pivot: it is looked up through Koha::Patrons->search_limited, like GET /patrons/{patron_id} does, so patrons the requesting user is not allowed to see (library groups 'Hide patron info', IndependentBranches) return 404. This applies to both current and old checkouts. Listing old checkouts also requires: - the 'intranetreadinghistory' system preference enabled - the borrowers: view_checkout_history permission Otherwise a 403 with the `checkout_history_not_allowed` error_code is returned. It also adds the `issuer.library` embed. The issuer is a Koha::Patron, so its information is redacted when the user cannot see it, but `library_id` is kept. Embedding the library allows the UI to display 'A patron from <library>' instead of leaking the staff member's name. The first subtest was also missing its txn_rollback, fixed. Test plan: 1. Apply patch 2. Run: $ ktd --shell k$ yarn api:bundle k$ restart_all k$ prove t/db_dependent/api/v1/patrons_checkouts.t \ t/db_dependent/api/v1/checkouts.t \ xt/api.t => SUCCESS: Tests pass! 3. Sign off :-D Assisted-by: Opus 5.5 (Anthropic) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27184 --- Comment #2 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- Created attachment 212229 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=212229&action=edit Bug 27184: Make the circulation history use the API This patch replaces the server-side rendered table on members/readingrec.pl with a `circulation-history` Vue island that fetches the data from GET /patrons/{patron_id}/checkouts, paginated, sorted and filtered server-side. readingrec.pl no longer loads the full list of checkouts and old checkouts, which was very slow for heavy borrowers. The page now shows two tables: 'Current checkouts' and 'Previous checkouts'. Both use the existing 'checkouthistory-table' table settings. The On-site checkouts tabs filter both tables. Display details: - Dates use $date/$datetime, due dates use { as_due_date: true } like the KohaDates TT plugin did - Titles use $biblio_to_html. Rows for deleted items read 'Item deleted' - 'Checked out by' (RecordStaffUserOnCheckout) uses $patron_to_html. When the logged in user cannot see the issuer, the API redacts it and 'A patron from <library>' is displayed, without a link. The column is neither searchable nor sortable, to avoid leaking redacted names through filtering or ordering. Note the previous template displayed the issuer name regardless of this. - The renewals 'View' link keeps using checkout_renewals_modal.js, now using a delegated click handler so it works on rows drawn by the table Test plan: 1. Apply patch 2. Rebuild the JS and restart: $ ktd --shell k$ yarn js:build k$ yarn api:bundle k$ restart_all 3. Check out and check in a few items for a patron, and leave some checked out 4. Go to the patron's 'Circulation history' tab => SUCCESS: Current and previous checkouts are listed in two tables => SUCCESS: Sorting, searching and pagination work (check the API requests in the browser's network tab) => SUCCESS: Dates and due dates are formatted as per the 'dateformat' and 'TimeFormat' system preferences 5. Click 'View' on a renewed checkout => SUCCESS: The renewals modal is displayed 6. Enable OnSiteCheckouts, do an on-site checkout, reload and use the tabs => SUCCESS: Both tables are filtered 7. Enable RecordStaffUserOnCheckout and checkout items with a staff user from a different library 8. Set up a library group with 'Hide patron info for libraries outside this group' that doesn't include that library, and login as a user without view_borrower_infos_from_any_libraries, from a library in the group, that can see the patron => SUCCESS: 'Checked out by' reads 'A patron from <library>', no link 9. Run: k$ prove xt/check-thead-tt-tags.t k$ yarn cypress run --spec t/cypress/integration/KohaTable/CirculationHistory_spec.ts => SUCCESS: Tests pass! 10. Sign off :-D Assisted-by: Opus 5.5 (Anthropic) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27184 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27184 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC|agustinmoyano@theke.io | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27184 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #212228|0 |1 is obsolete| | Attachment #212229|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27184 --- Comment #3 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- Created attachment 212273 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=212273&action=edit Bug 27184: Add Koha::Module::Policy::CheckoutHistory This patch adds a module policy (see Koha::Module::Policy, bug 42383) for the checkout history views: the patron's circulation history and the record's checkout history (bug 29275). Both views decide what to display from the same system preferences and permissions, and their API routes enforce the same rules. The policy is the single place where they are computed: - view_patrons: circulate_remaining_permissions - view_checkout_history: intranetreadinghistory enabled and borrowers: view_checkout_history - hide_patron_name: HidePatronName - anonymous_patron_id: AnonymousPatron - show_issuer: RecordStaffUserOnCheckout - onsite_checkouts: OnSiteCheckouts The checkout_history_policy API definition is added, and checkout_history is added to the module_policy definition, so API errors can carry it. Test plan: 1. Apply patch 2. Run: $ ktd --shell k$ yarn api:bundle k$ prove t/db_dependent/Koha/Module/Policy/CheckoutHistory.t \ t/db_dependent/Koha/Module/Policy.t \ xt/api.t => SUCCESS: Tests pass! 3. Sign off :-D Assisted-by: Opus 5.5 (Anthropic) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27184 --- Comment #4 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- Created attachment 212274 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=212274&action=edit Bug 27184: Allow listing a patron's old checkouts through the API This patch adds a `checked_in` query parameter to the GET /patrons/{patron_id}/checkouts route, so the circulation history can be fetched paginated instead of loaded in full by readingrec.pl. The patron is now the pivot: it is looked up through Koha::Patrons->search_limited, like GET /patrons/{patron_id} does, so patrons the requesting user is not allowed to see (library groups 'Hide patron info', IndependentBranches) return 404. This applies to both current and old checkouts. Listing old checkouts also requires the view_checkout_history capability of the CheckoutHistory module policy (intranetreadinghistory enabled and borrowers: view_checkout_history). Otherwise a 403 with the `checkout_history_not_allowed` error_code is returned, carrying the current policy so the client can refresh its view of it. It also adds the `issuer.library` embed. The issuer is a Koha::Patron, so its information is redacted when the user cannot see it, but `library_id` is kept. Embedding the library allows the UI to display 'A patron from <library>' instead of leaking the staff member's name. The first subtest was also missing its txn_rollback, fixed. Test plan: 1. Apply patch 2. Run: $ ktd --shell k$ yarn api:bundle k$ restart_all k$ prove t/db_dependent/api/v1/patrons_checkouts.t \ t/db_dependent/api/v1/checkouts.t \ xt/api.t => SUCCESS: Tests pass! 3. Sign off :-D Assisted-by: Opus 5.5 (Anthropic) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27184 --- Comment #5 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- Created attachment 212275 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=212275&action=edit Bug 27184: Make the circulation history use the API This patch replaces the server-side rendered table on members/readingrec.pl with a `circulation-history` Vue island that fetches the data from GET /patrons/{patron_id}/checkouts, paginated, sorted and filtered server-side. readingrec.pl no longer loads the full list of checkouts and old checkouts, which was very slow for heavy borrowers. The page now shows two tables: 'Current checkouts' and 'Previous checkouts'. Both use the existing 'checkouthistory-table' table settings. The On-site checkouts tabs filter both tables. The page is bootstrapped with the CheckoutHistory module policy, passed to the island as an attribute: it replaces the permission and system preference checks the template did (access to the history, OnSiteCheckouts and RecordStaffUserOnCheckout). Display details: - Dates use $date/$datetime, due dates use { as_due_date: true } like the KohaDates TT plugin did - Titles use $biblio_to_html. Rows for deleted items read 'Item deleted' - 'Checked out by' (RecordStaffUserOnCheckout) uses $patron_to_html. When the logged in user cannot see the issuer, the API redacts it and 'A patron from <library>' is displayed, without a link. The column is neither searchable nor sortable, to avoid leaking redacted names through filtering or ordering. Note the previous template displayed the issuer name regardless of this. - The renewals 'View' link keeps using checkout_renewals_modal.js, now using a delegated click handler so it works on rows drawn by the table Test plan: 1. Apply patch 2. Rebuild the JS and restart: $ ktd --shell k$ yarn js:build k$ yarn api:bundle k$ restart_all 3. Check out and check in a few items for a patron, and leave some checked out 4. Go to the patron's 'Circulation history' tab => SUCCESS: Current and previous checkouts are listed in two tables => SUCCESS: Sorting, searching and pagination work (check the API requests in the browser's network tab) => SUCCESS: Dates and due dates are formatted as per the 'dateformat' and 'TimeFormat' system preferences 5. Click 'View' on a renewed checkout => SUCCESS: The renewals modal is displayed 6. Enable OnSiteCheckouts, do an on-site checkout, reload and use the tabs => SUCCESS: Both tables are filtered 7. Enable RecordStaffUserOnCheckout and checkout items with a staff user from a different library 8. Set up a library group with 'Hide patron info for libraries outside this group' that doesn't include that library, and login as a user without view_borrower_infos_from_any_libraries, from a library in the group, that can see the patron => SUCCESS: 'Checked out by' reads 'A patron from <library>', no link 9. Run: k$ prove xt/check-thead-tt-tags.t k$ yarn cypress run --spec t/cypress/integration/KohaTable/CirculationHistory_spec.ts => SUCCESS: Tests pass! 10. Sign off :-D Assisted-by: Opus 5.5 (Anthropic) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27184 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |29275 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29275 [Bug 29275] Use the API to render checkout history for a biblio -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27184 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27184 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #212274|0 |1 is obsolete| | Attachment #212275|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27184 --- Comment #6 from David Nind <david@davidnind.com> --- Created attachment 212465 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=212465&action=edit Bug 27184: Allow listing a patron's old checkouts through the API This patch adds a `checked_in` query parameter to the GET /patrons/{patron_id}/checkouts route, so the circulation history can be fetched paginated instead of loaded in full by readingrec.pl. The patron is now the pivot: it is looked up through Koha::Patrons->search_limited, like GET /patrons/{patron_id} does, so patrons the requesting user is not allowed to see (library groups 'Hide patron info', IndependentBranches) return 404. This applies to both current and old checkouts. Listing old checkouts also requires the view_checkout_history capability of the CheckoutHistory module policy (intranetreadinghistory enabled and borrowers: view_checkout_history). Otherwise a 403 with the `checkout_history_not_allowed` error_code is returned, carrying the current policy so the client can refresh its view of it. It also adds the `issuer.library` embed. The issuer is a Koha::Patron, so its information is redacted when the user cannot see it, but `library_id` is kept. Embedding the library allows the UI to display 'A patron from <library>' instead of leaking the staff member's name. The first subtest was also missing its txn_rollback, fixed. Test plan: 1. Apply patch 2. Run: $ ktd --shell k$ yarn api:bundle k$ restart_all k$ prove t/db_dependent/api/v1/patrons_checkouts.t \ t/db_dependent/api/v1/checkouts.t \ xt/api.t => SUCCESS: Tests pass! 3. Sign off :-D Assisted-by: Opus 5.5 (Anthropic) Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27184 --- Comment #7 from David Nind <david@davidnind.com> --- Created attachment 212466 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=212466&action=edit Bug 27184: Make the circulation history use the API This patch replaces the server-side rendered table on members/readingrec.pl with a `circulation-history` Vue island that fetches the data from GET /patrons/{patron_id}/checkouts, paginated, sorted and filtered server-side. readingrec.pl no longer loads the full list of checkouts and old checkouts, which was very slow for heavy borrowers. The page now shows two tables: 'Current checkouts' and 'Previous checkouts'. Both use the existing 'checkouthistory-table' table settings. The On-site checkouts tabs filter both tables. The page is bootstrapped with the CheckoutHistory module policy, passed to the island as an attribute: it replaces the permission and system preference checks the template did (access to the history, OnSiteCheckouts and RecordStaffUserOnCheckout). Display details: - Dates use $date/$datetime, due dates use { as_due_date: true } like the KohaDates TT plugin did - Titles use $biblio_to_html. Rows for deleted items read 'Item deleted' - 'Checked out by' (RecordStaffUserOnCheckout) uses $patron_to_html. When the logged in user cannot see the issuer, the API redacts it and 'A patron from <library>' is displayed, without a link. The column is neither searchable nor sortable, to avoid leaking redacted names through filtering or ordering. Note the previous template displayed the issuer name regardless of this. - The renewals 'View' link keeps using checkout_renewals_modal.js, now using a delegated click handler so it works on rows drawn by the table Test plan: 1. Apply patch 2. Rebuild the JS and restart: $ ktd --shell k$ yarn js:build k$ yarn api:bundle k$ restart_all 3. Check out and check in a few items for a patron, and leave some checked out 4. Go to the patron's 'Circulation history' tab => SUCCESS: Current and previous checkouts are listed in two tables => SUCCESS: Sorting, searching and pagination work (check the API requests in the browser's network tab) => SUCCESS: Dates and due dates are formatted as per the 'dateformat' and 'TimeFormat' system preferences 5. Click 'View' on a renewed checkout => SUCCESS: The renewals modal is displayed 6. Enable OnSiteCheckouts, do an on-site checkout, reload and use the tabs => SUCCESS: Both tables are filtered 7. Enable RecordStaffUserOnCheckout and checkout items with a staff user from a different library 8. Set up a library group with 'Hide patron info for libraries outside this group' that doesn't include that library, and login as a user without view_borrower_infos_from_any_libraries, from a library in the group, that can see the patron => SUCCESS: 'Checked out by' reads 'A patron from <library>', no link 9. Run: k$ prove xt/check-thead-tt-tags.t k$ yarn cypress run --spec t/cypress/integration/KohaTable/CirculationHistory_spec.ts => SUCCESS: Tests pass! 10. Sign off :-D Assisted-by: Opus 5.5 (Anthropic) Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27184 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #212273|0 |1 is obsolete| | Attachment #212465|0 |1 is obsolete| | Attachment #212466|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27184 --- Comment #8 from David Nind <david@davidnind.com> --- Created attachment 212467 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=212467&action=edit Bug 27184: Add Koha::Module::Policy::CheckoutHistory This patch adds a module policy (see Koha::Module::Policy, bug 42383) for the checkout history views: the patron's circulation history and the record's checkout history (bug 29275). Both views decide what to display from the same system preferences and permissions, and their API routes enforce the same rules. The policy is the single place where they are computed: - view_patrons: circulate_remaining_permissions - view_checkout_history: intranetreadinghistory enabled and borrowers: view_checkout_history - hide_patron_name: HidePatronName - anonymous_patron_id: AnonymousPatron - show_issuer: RecordStaffUserOnCheckout - onsite_checkouts: OnSiteCheckouts The checkout_history_policy API definition is added, and checkout_history is added to the module_policy definition, so API errors can carry it. Test plan: 1. Apply patch 2. Run: $ ktd --shell k$ yarn api:bundle k$ prove t/db_dependent/Koha/Module/Policy/CheckoutHistory.t \ t/db_dependent/Koha/Module/Policy.t \ xt/api.t => SUCCESS: Tests pass! 3. Sign off :-D Assisted-by: Opus 5.5 (Anthropic) Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27184 --- Comment #9 from David Nind <david@davidnind.com> --- Created attachment 212468 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=212468&action=edit Bug 27184: Allow listing a patron's old checkouts through the API This patch adds a `checked_in` query parameter to the GET /patrons/{patron_id}/checkouts route, so the circulation history can be fetched paginated instead of loaded in full by readingrec.pl. The patron is now the pivot: it is looked up through Koha::Patrons->search_limited, like GET /patrons/{patron_id} does, so patrons the requesting user is not allowed to see (library groups 'Hide patron info', IndependentBranches) return 404. This applies to both current and old checkouts. Listing old checkouts also requires the view_checkout_history capability of the CheckoutHistory module policy (intranetreadinghistory enabled and borrowers: view_checkout_history). Otherwise a 403 with the `checkout_history_not_allowed` error_code is returned, carrying the current policy so the client can refresh its view of it. It also adds the `issuer.library` embed. The issuer is a Koha::Patron, so its information is redacted when the user cannot see it, but `library_id` is kept. Embedding the library allows the UI to display 'A patron from <library>' instead of leaking the staff member's name. The first subtest was also missing its txn_rollback, fixed. Test plan: 1. Apply patch 2. Run: $ ktd --shell k$ yarn api:bundle k$ restart_all k$ prove t/db_dependent/api/v1/patrons_checkouts.t \ t/db_dependent/api/v1/checkouts.t \ xt/api.t => SUCCESS: Tests pass! 3. Sign off :-D Assisted-by: Opus 5.5 (Anthropic) Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27184 --- Comment #10 from David Nind <david@davidnind.com> --- Created attachment 212469 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=212469&action=edit Bug 27184: Make the circulation history use the API This patch replaces the server-side rendered table on members/readingrec.pl with a `circulation-history` Vue island that fetches the data from GET /patrons/{patron_id}/checkouts, paginated, sorted and filtered server-side. readingrec.pl no longer loads the full list of checkouts and old checkouts, which was very slow for heavy borrowers. The page now shows two tables: 'Current checkouts' and 'Previous checkouts'. Both use the existing 'checkouthistory-table' table settings. The On-site checkouts tabs filter both tables. The page is bootstrapped with the CheckoutHistory module policy, passed to the island as an attribute: it replaces the permission and system preference checks the template did (access to the history, OnSiteCheckouts and RecordStaffUserOnCheckout). Display details: - Dates use $date/$datetime, due dates use { as_due_date: true } like the KohaDates TT plugin did - Titles use $biblio_to_html. Rows for deleted items read 'Item deleted' - 'Checked out by' (RecordStaffUserOnCheckout) uses $patron_to_html. When the logged in user cannot see the issuer, the API redacts it and 'A patron from <library>' is displayed, without a link. The column is neither searchable nor sortable, to avoid leaking redacted names through filtering or ordering. Note the previous template displayed the issuer name regardless of this. - The renewals 'View' link keeps using checkout_renewals_modal.js, now using a delegated click handler so it works on rows drawn by the table Test plan: 1. Apply patch 2. Rebuild the JS and restart: $ ktd --shell k$ yarn js:build k$ yarn api:bundle k$ restart_all 3. Check out and check in a few items for a patron, and leave some checked out 4. Go to the patron's 'Circulation history' tab => SUCCESS: Current and previous checkouts are listed in two tables => SUCCESS: Sorting, searching and pagination work (check the API requests in the browser's network tab) => SUCCESS: Dates and due dates are formatted as per the 'dateformat' and 'TimeFormat' system preferences 5. Click 'View' on a renewed checkout => SUCCESS: The renewals modal is displayed 6. Enable OnSiteCheckouts, do an on-site checkout, reload and use the tabs => SUCCESS: Both tables are filtered 7. Enable RecordStaffUserOnCheckout and checkout items with a staff user from a different library 8. Set up a library group with 'Hide patron info for libraries outside this group' that doesn't include that library, and login as a user without view_borrower_infos_from_any_libraries, from a library in the group, that can see the patron => SUCCESS: 'Checked out by' reads 'A patron from <library>', no link 9. Run: k$ prove xt/check-thead-tt-tags.t k$ yarn cypress run --spec t/cypress/integration/KohaTable/CirculationHistory_spec.ts => SUCCESS: Tests pass! 10. Sign off :-D Assisted-by: Opus 5.5 (Anthropic) Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27184 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david@davidnind.com --- Comment #11 from David Nind <david@davidnind.com> --- I can't figure out how to do step 8 of the "Make the circulation history use the API" patch (I added some notes as far as I got, but I find the language used with the library groups and system preference not clear at all to me). Everything else worked as per the test plan. Please set the status back to needs signoff if that is not sufficient. Testing notes (using KTD): 1. Step 6 - OnSiteCheckouts: - Set OnSiteCheckouts to "Enable" - When checking the item out to the patron, click the toggle in the barcode field - Select the "On-site checkout" checkbox - Click "Check out" 2. Step 8 - library groups - didn't manage to get this to work: - Create a group (Administration > Basic parameters > Library groups > New group) - Note: the text on the form is "Limit patron data access by group" - Add Centerville to the group (?) - Add Midway to the group (?) - Set up Henry Acevedo's account so that you can log in as Henry - Give Henry these permissions - Staff access, allows viewing of catalogue in staff interface (catalogue) - Add, modify and view patron information (borrowers) . Remove view_borrower_infos_from_any_libraries - Log in as Henry to ?? - Unsure what to do here! -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org