[Bug 32266] New: Large amount of late orders slows the service
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32266 Bug ID: 32266 Summary: Large amount of late orders slows the service Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Acquisitions Assignee: koha-bugs@lists.koha-community.org Reporter: emmi.takkinen@koha-suomi.fi QA Contact: testopia@bugs.koha-community.org Almost all our library consortiums have large amounts of late orders. Smallest amount is around 2000, but largest is over 25000. Even with batch of 2000 orders, lateorders.pl takes over 40 seconds to open. Handling larger batches eventually leads to a Proxy error. One (quite easy imo) way to speed up fetching late orders is to add a syspref to set default value for late order filter "Order date: [] days ago". -- 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=32266 mathieu saby <mathsabypro@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mathsabypro@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32266 Emmi Takkinen <emmi.takkinen@koha-suomi.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Assignee|koha-bugs@lists.koha-commun |emmi.takkinen@koha-suomi.fi |ity.org | --- Comment #1 from Emmi Takkinen <emmi.takkinen@koha-suomi.fi> --- Created attachment 144145 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=144145&action=edit Bug 32266: Add new syspref DefaultLateOrderFilterDaysAgo Some libraries might have large amounts of late orders that slow down opening the lateorders.pl. E.g. patch of 2000 orders takes about 40 seconds to open, larger patches lead to a proxy error. This patch adds new syspref DefaultLateOrderFilterDaysAgo. With this libraries can control how many days old late orders should be for them to show in late orders listing. To test: 1. Open browsers console (F12) and from there Network tab. 2. Navigate to Acquisitions -> Late Orders. => Take a note from browsers console how long it takes to open late orders listing. 3. Apply this patch, update you database and restart your services if needed. 4. Set some value to syspref DefaultLateOrderFilterDaysAgo (999 is max). 5. Load Late orders page again. => Loading page should now be significantly faster. => Only orders which Sponsored-by: Koha-Suomi Oy -- 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=32266 Amit Gupta <amitddng135@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |amit.gupta@informaticsgloba | |l.com, | |amitddng135@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32266 Amit Gupta <amitddng135@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #144145|0 |1 is obsolete| | --- Comment #2 from Amit Gupta <amitddng135@gmail.com> --- Created attachment 144165 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=144165&action=edit Bug 32266: Add new syspref DefaultLateOrderFilterDaysAgo To test: 1. Open browsers console (F12) and from there Network tab. 2. Navigate to Acquisitions -> Late Orders. => Take a note from browsers console how long it takes to open late orders listing. 3. Apply this patch, update you database and restart your services if needed. 4. Set some value to syspref DefaultLateOrderFilterDaysAgo (999 is max). 5. Load Late orders page again. Nice enhancement. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32266 Amit Gupta <amitddng135@gmail.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=32266 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32266 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #144165|0 |1 is obsolete| | --- Comment #3 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 144699 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=144699&action=edit Bug 32266: Add new syspref DefaultLateOrderFilterDaysAgo Some libraries might have large amounts of late orders that slow down opening the lateorders.pl. E.g. patch of 2000 orders takes about 40 seconds to open, larger patches lead to a proxy error. This patch adds new syspref DefaultLateOrderFilterDaysAgo. With this libraries can control how many days old late orders should be for them to show in late orders listing. To test: 1. Open browsers console (F12) and from there Network tab. 2. Navigate to Acquisitions -> Late Orders. => Take a note from browsers console how long it takes to open late orders listing. 3. Apply this patch, update you database and restart your services if needed. 4. Set some value to syspref DefaultLateOrderFilterDaysAgo (999 is max). 5. Load Late orders page again. => Loading page should now be significantly faster. => Only orders which Sponsored-by: Koha-Suomi Oy Signed-off-by: Amit Gupta <amit.gupta@informaticsglobal.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32266 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com Status|Passed QA |In Discussion --- Comment #4 from Tomás Cohen Arazi <tomascohen@gmail.com> --- I understand where this is coming from, but we should really just copy and paste the API-based paginated orders table from parcel.tt and change some query parameters to match this use case... I can help if needed. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32266 --- Comment #5 from Emmi Takkinen <emmi.takkinen@koha-suomi.fi> --- (In reply to Tomás Cohen Arazi from comment #4)
I understand where this is coming from, but we should really just copy and paste the API-based paginated orders table from parcel.tt and change some query parameters to match this use case...
I can help if needed.
That is definitely a better solution in a long run. My plan was to first provide syspref as a simpler solution and then examine if we can optimize code in a different bug. I'll try adding that paginated table here and ask help if there are any problems. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32266 Emmi Takkinen <emmi.takkinen@koha-suomi.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|emmi.takkinen@koha-suomi.fi |koha-bugs@lists.koha-commun | |ity.org --- Comment #6 from Emmi Takkinen <emmi.takkinen@koha-suomi.fi> --- I haven't been able to work with this and probably won't be a long time. Removing myself from assigned so if someone is able to take a look at this feel free to do so. -- 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=32266 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |tomascohen@gmail.com |ity.org | Status|In Discussion |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=32266 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |39816 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39816 [Bug 39816] Allow embedding `late_since_days`in baskets -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32266 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #144699|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=32266 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=32266 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |39830 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39830 [Bug 39830] Add order claim object definition -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32266 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |39832 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39832 [Bug 39832] Add $basket->vendor() method -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32266 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=39845 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32266 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=32266 --- Comment #7 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- Created attachment 182041 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=182041&action=edit Bug 32266: Add only_late filters to the endpoint -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32266 --- Comment #8 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- Created attachment 182042 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=182042&action=edit Bug 32266: Add more embed options to orders and baskets This patch adds the ability to embed: Orders: * basket.vendor * basket.authorizer+strings * claims+count Baskets: * vendor * authorizer+strings -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32266 --- Comment #9 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- Created attachment 182043 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=182043&action=edit Bug 32266: Make the late orders page use the API This bug makes the late orders page render using the API. Everything should work as usual. To test: 0. Have a bunch of late orders, from different vendors with different dates 1. Check how the page works without the patches 2. Notice it works similar with the patches 3. Sign off :-D -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32266 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Large amount of late orders |Make the late orders page |slows the service |render using the API -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32266 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |Laura.escamilla@bywatersolu | |tions.com, | |lucas@bywatersolutions.com, | |nick@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32266 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@openfifth.c | |o.uk, | |matt.blenkinsop@openfifth.c | |o.uk -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32266 --- Comment #10 from Emmi Takkinen <emmi.takkinen@koha-suomi.fi> --- Page opens, but table doesn't load. In browsers console is a message:
Uncaught TypeError: row.basket.authorizer is null Maybe there needs to be a check if fetched row has authorisedby value in place, since it can be sometimes be NULL.
-- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32266 --- Comment #11 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- (In reply to Emmi Takkinen from comment #10)
Page opens, but table doesn't load. In browsers console is a message:
Uncaught TypeError: row.basket.authorizer is null Maybe there needs to be a check if fetched row has authorisedby value in place, since it can be sometimes be NULL.
Did you do: ```shell $ ktd --shell k$ yarn build k$ koha-plack --restart kohadev ``` before testing? I will double-check just in case, but it feels like I had that check in place. -- You are receiving this mail because: You are watching all bug changes.
UPDATE aqbasket SET authorisedby=NULL WHERE basketno=2; (in this case 2 was my chosen basket).
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32266 --- Comment #12 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- Created attachment 182269 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=182269&action=edit Bug 32266: (follow-up) Handle null basket.authorizer gracefully This patch makes the JS code handle the situation of `aqbasket.authorisedby` being NULL. I was only able to reproduce this by manually touching the DB, but existing data might have this situation. To test: 1. Have a few late orders 2. Pick a basket id 3. Run: $ ktd --shell k$ koha-mysql kohadev 4. Visit the late orders page => FAIL: The table doesn't render correclty, the browser inspector says something about authorizer being null 5. Apply this patch 6. Repeat 4 => SUCCESS: The table renders correctly, the 'Library' column has an empty string for the affected rows 7. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32266 --- Comment #13 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- (In reply to Emmi Takkinen from comment #10)
Page opens, but table doesn't load. In browsers console is a message:
Uncaught TypeError: row.basket.authorizer is null Maybe there needs to be a check if fetched row has authorisedby value in place, since it can be sometimes be NULL.
Fixed! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32266 --- Comment #14 from Emmi Takkinen <emmi.takkinen@koha-suomi.fi> --- Sorry but there are still some problems: - Estimated delivery date and internal note editing opens to a new page, editing vendor note opens a pop-up. Without these patches they all open in a pop-up. - Cannot open basket, url looks weird:
<a href="basket.pl?basketno=" 1976"="" title="10175">10175 (1976)</a>
But otherwise this works as expected. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32266 --- Comment #15 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- (In reply to Emmi Takkinen from comment #14)
Sorry but there are still some problems:
- Estimated delivery date and internal note editing opens to a new page, editing vendor note opens a pop-up. Without these patches they all open in a pop-up.
I think I'll just make them modals as in the basket page.
- Cannot open basket, url looks weird:
<a href="basket.pl?basketno=" 1976"="" title="10175">10175 (1976)</a>
This was a typo. Will fix right now.
But otherwise this works as expected.
Great. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32266 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #182043|0 |1 is obsolete| | Attachment #182269|0 |1 is obsolete| | --- Comment #16 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- Created attachment 182377 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=182377&action=edit Bug 32266: Make the late orders page use the API This bug makes the late orders page render using the API. Everything should work as usual. To test: 0. Have a bunch of late orders, from different vendors with different dates 1. Check how the page works without the patches 2. Notice it works similar with the patches 3. Sign off :-D -- You are receiving this mail because: You are watching all bug changes.
UPDATE aqbasket SET authorisedby=NULL WHERE basketno=2; (in this case 2 was my chosen basket).
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32266 --- Comment #17 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- Created attachment 182378 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=182378&action=edit Bug 32266: (follow-up) Handle null basket.authorizer gracefully This patch makes the JS code handle the situation of `aqbasket.authorisedby` being NULL. I was only able to reproduce this by manually touching the DB, but existing data might have this situation. To test: 1. Have a few late orders 2. Pick a basket id 3. Run: $ ktd --shell k$ koha-mysql kohadev 4. Visit the late orders page => FAIL: The table doesn't render correclty, the browser inspector says something about authorizer being null 5. Apply this patch 6. Repeat 4 => SUCCESS: The table renders correctly, the 'Library' column has an empty string for the affected rows 7. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32266 --- Comment #18 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- Created attachment 182379 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=182379&action=edit Bug 32266: (follow-up) Add event listeners in correct context As the datatable is redrawn asynchronously and on each interaction, the initially defined event listeners have no effect. This yields a weird rendering of the attribute edit form in a new page. This patch makes the event listeners exist at the `$(#late_orders)` level so they still apply to newly created cells on redrawing the datatable. A couple places get 'modernized' by using the arrow syntax for anonymous functions. `e.target` is used instead of `$(this)` where it applies. To test: 1. Without the patch, have some late orders 2. Try changing the delivery date or any of the notes => FAIL: You are sent to a new page 3. Apply this patch and reload 4. Repeat 2 => SUCCESS: You are presented a nice modal instead (the original behavior) 5. Change the values, verify the table is re-rendered and the values are correct 6. Sign off :-D -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32266 Emmi Takkinen <emmi.takkinen@koha-suomi.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #182041|0 |1 is obsolete| | --- Comment #19 from Emmi Takkinen <emmi.takkinen@koha-suomi.fi> --- Created attachment 182420 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=182420&action=edit Bug 32266: Add only_late filters to the endpoint Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32266 Emmi Takkinen <emmi.takkinen@koha-suomi.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #182042|0 |1 is obsolete| | --- Comment #20 from Emmi Takkinen <emmi.takkinen@koha-suomi.fi> --- Created attachment 182421 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=182421&action=edit Bug 32266: Add more embed options to orders and baskets This patch adds the ability to embed: Orders: * basket.vendor * basket.authorizer+strings * claims+count Baskets: * vendor * authorizer+strings Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32266 Emmi Takkinen <emmi.takkinen@koha-suomi.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #182377|0 |1 is obsolete| | --- Comment #21 from Emmi Takkinen <emmi.takkinen@koha-suomi.fi> --- Created attachment 182422 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=182422&action=edit Bug 32266: Make the late orders page use the API This bug makes the late orders page render using the API. Everything should work as usual. To test: 0. Have a bunch of late orders, from different vendors with different dates 1. Check how the page works without the patches 2. Notice it works similar with the patches 3. Sign off :-D Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi> -- You are receiving this mail because: You are watching all bug changes.
UPDATE aqbasket SET authorisedby=NULL WHERE basketno=2; (in this case 2 was my chosen basket).
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32266 --- Comment #22 from Emmi Takkinen <emmi.takkinen@koha-suomi.fi> --- Created attachment 182423 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=182423&action=edit Bug 32266: (follow-up) Handle null basket.authorizer gracefully This patch makes the JS code handle the situation of `aqbasket.authorisedby` being NULL. I was only able to reproduce this by manually touching the DB, but existing data might have this situation. To test: 1. Have a few late orders 2. Pick a basket id 3. Run: $ ktd --shell k$ koha-mysql kohadev 4. Visit the late orders page => FAIL: The table doesn't render correclty, the browser inspector says something about authorizer being null 5. Apply this patch 6. Repeat 4 => SUCCESS: The table renders correctly, the 'Library' column has an empty string for the affected rows 7. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32266 Emmi Takkinen <emmi.takkinen@koha-suomi.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #182378|0 |1 is obsolete| | Attachment #182379|0 |1 is obsolete| | --- Comment #23 from Emmi Takkinen <emmi.takkinen@koha-suomi.fi> --- Created attachment 182424 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=182424&action=edit Bug 32266: (follow-up) Add event listeners in correct context As the datatable is redrawn asynchronously and on each interaction, the initially defined event listeners have no effect. This yields a weird rendering of the attribute edit form in a new page. This patch makes the event listeners exist at the `$(#late_orders)` level so they still apply to newly created cells on redrawing the datatable. A couple places get 'modernized' by using the arrow syntax for anonymous functions. `e.target` is used instead of `$(this)` where it applies. To test: 1. Without the patch, have some late orders 2. Try changing the delivery date or any of the notes => FAIL: You are sent to a new page 3. Apply this patch and reload 4. Repeat 2 => SUCCESS: You are presented a nice modal instead (the original behavior) 5. Change the values, verify the table is re-rendered and the values are correct 6. Sign off :-D Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32266 Emmi Takkinen <emmi.takkinen@koha-suomi.fi> 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=32266 Andrew Fuerste-Henry <andrew@bywatersolutions.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=32266 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@gmail.com --- Comment #24 from Jonathan Druart <jonathan.druart@gmail.com> --- Should not we use kohaTable's external_filter_nodes for the filters? + undefined, //external_filter_nodes -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32266 --- Comment #25 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- (In reply to Jonathan Druart from comment #24)
Should not we use kohaTable's external_filter_nodes for the filters?
+ undefined, //external_filter_nodes
That feature is only for when you're building a DBIC query. In this case, we need to pass some extra query parameters like in `only_active=1`. Any follow-ups improving this implementation are welcome. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32266 --- Comment #26 from Jonathan Druart <jonathan.druart@gmail.com> --- 1. No estimated delivery dates displayed when calculated (and filter does not work) 2. The "total" tfoot has been removed 3. Sort by claims count raises a 500 DBI Exception: DBD::mysql::st execute failed: Unknown column 'me.claims_count' in 'order clause' at /kohadevbox/koha/Koha/Objects.pm line 401 4. "Library" is empty (In reply to Tomás Cohen Arazi (tcohen) from comment #25)
(In reply to Jonathan Druart from comment #24)
Should not we use kohaTable's external_filter_nodes for the filters?
+ undefined, //external_filter_nodes
That feature is only for when you're building a DBIC query. In this case, we need to pass some extra query parameters like in `only_active=1`. Any follow-ups improving this implementation are welcome.
You can use it anyway. Look at the patron search. Search using "search fields" and "search type". Copy shareable link and reuse it => the form is restored. If you don't use it you will have to remove the "copy shareable link" feature as it won't work correctly. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32266 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA --- Comment #27 from Jonathan Druart <jonathan.druart@gmail.com> --- ok sorry, replied too fast. The problem is that you have the logic in Perl. You could move it to JS (we have done that somewhere else but I don't remember exactly where), and you would pass the date >= xxx && date <= yyy, etc. But I do understand that it will make thing more complex here. I can try and have a look next week if you want me to. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32266 --- Comment #28 from Jonathan Druart <jonathan.druart@gmail.com> --- + stateSave: true, This should really not be needed. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32266 --- Comment #29 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 186625 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=186625&action=edit Bug 32266: Use external_filter_nodes -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32266 --- Comment #30 from Jonathan Druart <jonathan.druart@gmail.com> --- (In reply to Jonathan Druart from comment #29)
Created attachment 186625 [details] [review] Bug 32266: Use external_filter_nodes
This is working quite well. There is a problem with the vendor filter because you populate it after DT initialized it seems, and so it got reset to the first value ("All vendors"). Maybe you just need to move it before, I have not tested. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32266 Bug 32266 depends on bug 39832, which changed state. Bug 39832 Summary: Add $basket->vendor() method https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39832 What |Removed |Added ---------------------------------------------------------------------------- Status|Needs documenting |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32266 Bug 32266 depends on bug 39830, which changed state. Bug 39830 Summary: Add order claim object definition https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39830 What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to main |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32266 --- Comment #31 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Showing a total at the bottom of the table presents complications when we're paginating the orders. Showing a total of only what's currently on the page seems somewhat arbitrary, but showing the total of all late orders while only displaying some of them seems confusing because the total won't match the numbers above it. What's the preference here? I suppose if we show the total of only what's on the page, the user can always make the page show all orders in order to get the grand total. Would it make sense to add a grand total to the page that's separate from the table? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32266 --- Comment #32 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- (In reply to Jonathan Druart from comment #26)
2. The "total" tfoot has been removed
I'm talking with folks about what to do here, what is meaningful and/or useful. Totaling on the resultset made sense when all the rows were retrieved at once. but now things are paginated, what does the total mean? If we filter something, should we recalculate the totals? We would eventually need a separate endpoint to hit for the totals, which is fine but I want to hear users explain if this is useful or not first. We could even have some separate stats area on the page with fixed values they think are useful.
3. Sort by claims count raises a 500 DBI Exception: DBD::mysql::st execute failed: Unknown column 'me.claims_count' in 'order clause' at /kohadevbox/koha/Koha/Objects.pm line 401
Please look at bug 41950, I think I got a generic solution that will help us clear things in other places too! -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org