[Koha-bugs] [Bug 20212] Slowness in Receiving in Acquisitions

2019-02-20 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20212

Tomás Cohen Arazi  changed:

   What|Removed |Added

 CC||tomasco...@gmail.com

--- Comment #4 from Tomás Cohen Arazi  ---
I submitted bug 18731 in order to create a version of this that can be loading
as-needed (AJAX pagination). But Jonathan suggested we had a better endpoint
that exposes an extended data structure so it requires less requests to render
it all (i.e. instead of a library_id, embed the complete library object on each
row to render the name, etc).

I will propose an /extended suffix as a generic way to specify we want related
objects embedded.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

[Koha-bugs] [Bug 20212] Slowness in Receiving in Acquisitions

2019-02-20 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20212

Tomás Cohen Arazi  changed:

   What|Removed |Added

 Depends on||18731

--- Comment #5 from Tomás Cohen Arazi  ---
And please help make bug 18731 into master ASAP!


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18731
[Bug 18731] Add routes for acquisition orders
-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

[Koha-bugs] [Bug 20212] Slowness in Receiving in Acquisitions

2020-09-10 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20212

Tomás Cohen Arazi  changed:

   What|Removed |Added

 Status|ASSIGNED|Needs Signoff

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 20212] Slowness in Receiving in Acquisitions

2020-09-10 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20212

Tomás Cohen Arazi  changed:

   What|Removed |Added

 Attachment #103686|0   |1
is obsolete||

--- Comment #52 from Tomás Cohen Arazi  ---
Created attachment 109862
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=109862&action=edit
Bug 20212: Clean parcel.pl

Signed-off-by: Tomas Cohen Arazi 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 20212] Slowness in Receiving in Acquisitions

2020-09-10 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20212

--- Comment #54 from Tomás Cohen Arazi  ---
Created attachment 109864
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=109864&action=edit
Bug 20212: Add missing relation in Biblio

Signed-off-by: Tomas Cohen Arazi 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 20212] Slowness in Receiving in Acquisitions

2020-09-10 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20212

Tomás Cohen Arazi  changed:

   What|Removed |Added

 Attachment #103684|0   |1
is obsolete||

--- Comment #51 from Tomás Cohen Arazi  ---
Created attachment 109861
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=109861&action=edit
Bug 20212: Add more embeddable objects to orders

This patch adds options to embed more related objects based on the needs
by parcel.tt.

For filtering by biblioitems fields (ISBN and EAN) I had to make the
'list' method a modified version of the objects->search helper. I
thought of doing it in a more generic way but I didn't find any other
use cases and it would certainly make an already complex piece of code
even more complex.

So this is quite similar, but at some steps the biblio. gets translated into the proper relation names, and the same
happens for prefetching.

A new parameter is also added: only_active. It makes the controller use
Koha::Acquisition::Orders->filter_by_active, avoiding the need to build
complex queries in the UI.

The same handling is done when the order_id parameter is passed (outside
the q= parameters). In this case using
Koha::Acquisition::Orders->filter_by_id_including_transfers

This is all respecting the C4::Acquisitions::SearchOrders behaviour.

TL;DR:

This patch adapts the code from the list() sub so it manipulates the
query parameters and the embed header so:
- the biblioitem relationship is prefetch
- any queries on biblio.isbn and biblio.ean are correctly translated into
search on the
  biblioitems table.
- Adds an only_active parameter to the /acquisitions/orders route to
  easily request only the active orders.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 20212] Slowness in Receiving in Acquisitions

2020-09-10 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20212

Tomás Cohen Arazi  changed:

   What|Removed |Added

 Attachment #103687|0   |1
is obsolete||

--- Comment #53 from Tomás Cohen Arazi  ---
Created attachment 109863
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=109863&action=edit
Bug 20212: Use API to render orders datatable

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 20212] Slowness in Receiving in Acquisitions

2020-09-10 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20212

Tomás Cohen Arazi  changed:

   What|Removed |Added

 Attachment #109863|0   |1
is obsolete||

--- Comment #55 from Tomás Cohen Arazi  ---
Created attachment 109866
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=109866&action=edit
Bug 20212: Use API to render orders datatable

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 20212] Slowness in Receiving in Acquisitions

2020-09-10 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20212

Tomás Cohen Arazi  changed:

   What|Removed |Added

 Attachment #103688|0   |1
is obsolete||

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 20212] Slowness in Receiving in Acquisitions

2020-09-10 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20212

Tomás Cohen Arazi  changed:

   What|Removed |Added

 Attachment #109862|0   |1
is obsolete||

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 20212] Slowness in Receiving in Acquisitions

2020-09-10 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20212

Tomás Cohen Arazi  changed:

   What|Removed |Added

 Attachment #103685|0   |1
is obsolete||

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 20212] Slowness in Receiving in Acquisitions

2020-09-10 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20212

Tomás Cohen Arazi  changed:

   What|Removed |Added

 Attachment #109861|0   |1
is obsolete||

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 20212] Slowness in Receiving in Acquisitions

2020-09-10 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20212

Tomás Cohen Arazi  changed:

   What|Removed |Added

 Attachment #109866|0   |1
is obsolete||

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 20212] Slowness in Receiving in Acquisitions

2020-09-10 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20212

Tomás Cohen Arazi  changed:

   What|Removed |Added

 Attachment #109864|0   |1
is obsolete||

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 20212] Slowness in Receiving in Acquisitions

2020-09-10 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20212

--- Comment #56 from Tomás Cohen Arazi  ---
Created attachment 109867
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=109867&action=edit
Bug 20212: Add more embeddable objects to orders

This patch adds options to embed more related objects based on the needs
by parcel.tt.

For filtering by biblioitems fields (ISBN and EAN) I had to make the
'list' method a modified version of the objects->search helper. I
thought of doing it in a more generic way but I didn't find any other
use cases and it would certainly make an already complex piece of code
even more complex.

So this is quite similar, but at some steps the biblio. gets translated into the proper relation names, and the same
happens for prefetching.

A new parameter is also added: only_active. It makes the controller use
Koha::Acquisition::Orders->filter_by_active, avoiding the need to build
complex queries in the UI.

The same handling is done when the order_id parameter is passed (outside
the q= parameters). In this case using
Koha::Acquisition::Orders->filter_by_id_including_transfers

This is all respecting the C4::Acquisitions::SearchOrders behaviour.

TL;DR:

This patch adapts the code from the list() sub so it manipulates the
query parameters and the embed header so:
- the biblioitem relationship is prefetch
- any queries on biblio.isbn and biblio.ean are correctly translated into
search on the
  biblioitems table.
- Adds an only_active parameter to the /acquisitions/orders route to
  easily request only the active orders.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 20212] Slowness in Receiving in Acquisitions

2020-09-10 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20212

--- Comment #57 from Tomás Cohen Arazi  ---
Created attachment 109868
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=109868&action=edit
Bug 20212: Clean parcel.pl

Signed-off-by: Tomas Cohen Arazi 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 20212] Slowness in Receiving in Acquisitions

2020-09-10 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20212

--- Comment #59 from Tomás Cohen Arazi  ---
Created attachment 109870
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=109870&action=edit
Bug 20212: Add missing relation in Biblio

Signed-off-by: Tomas Cohen Arazi 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 20212] Slowness in Receiving in Acquisitions

2020-09-10 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20212

--- Comment #58 from Tomás Cohen Arazi  ---
Created attachment 109869
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=109869&action=edit
Bug 20212: Use API to render orders datatable

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 20212] Slowness in Receiving in Acquisitions

2020-09-10 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20212

Andrew Fuerste-Henry  changed:

   What|Removed |Added

 CC||and...@bywatersolutions.com

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 20212] Slowness in Receiving in Acquisitions

2020-09-11 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20212

--- Comment #60 from Tomás Cohen Arazi  ---
Created attachment 109936
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=109936&action=edit
Bug 20212: Remove warning if no basket group

If any row contains no basket group, the browser console will show a
datatables warning about basket.basket_group.name not existing.

This patch gets rid of it.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 20212] Slowness in Receiving in Acquisitions

2020-09-16 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20212

Andrew Fuerste-Henry  changed:

   What|Removed |Added

 Status|Needs Signoff   |Failed QA

--- Comment #61 from Andrew Fuerste-Henry  ---
I was able to successfully apply these patches to a fresh master site, but ran
into trouble when I loaded an existing library's 19.11 data into my testing
docker, updated the database to master, applied these patches and restarted
services, and then tried to receive. When I go to parcel.pl, the pending orders
list is empty when it should not be and I get a long db error. I'll attach the
content of my plack error log in a text file.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 20212] Slowness in Receiving in Acquisitions

2020-09-16 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20212

--- Comment #62 from Andrew Fuerste-Henry  ---
Created attachment 110229
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=110229&action=edit
Plack error when trying to receive w/ library data

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 20212] Slowness in Receiving in Acquisitions

2020-09-16 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20212

Tomás Cohen Arazi  changed:

   What|Removed |Added

 Status|Failed QA   |Needs Signoff

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 20212] Slowness in Receiving in Acquisitions

2020-09-16 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20212

Tomás Cohen Arazi  changed:

   What|Removed |Added

 Attachment #109936|0   |1
is obsolete||

--- Comment #63 from Tomás Cohen Arazi  ---
Created attachment 110234
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=110234&action=edit
Bug 20212: Remove warning if no basket group

If any row contains no basket group, the browser console will show a
datatables warning about basket.basket_group.name not existing.

This patch gets rid of it.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 20212] Slowness in Receiving in Acquisitions

2020-09-21 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20212

Tomás Cohen Arazi  changed:

   What|Removed |Added

 Attachment #110234|0   |1
is obsolete||

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 20212] Slowness in Receiving in Acquisitions

2020-09-21 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20212

Tomás Cohen Arazi  changed:

   What|Removed |Added

 Attachment #109869|0   |1
is obsolete||

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 20212] Slowness in Receiving in Acquisitions

2020-09-21 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20212

--- Comment #64 from Tomás Cohen Arazi  ---
Created attachment 110478
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=110478&action=edit
Bug 20212: Use API to render orders datatable

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 20212] Slowness in Receiving in Acquisitions

2020-09-21 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20212

Tomás Cohen Arazi  changed:

   What|Removed |Added

 Attachment #110478|0   |1
is obsolete||

--- Comment #65 from Tomás Cohen Arazi  ---
Created attachment 110482
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=110482&action=edit
Bug 20212: Use API to render orders datatable

This patch makes the pending orders datatable render using the API
instead of hte old controller script. It implements native server-side
pagination thanks to the API and the datatables wrapper.

On polishing it, we found that data can contain many null values, and it
got dirtier in the process.

This code with all the checks that are done on the data is the result of
testing this dev with real-life production databases, huge ones with
thousands of orderlines.

To test:
1. You should compare the behaviour between this table, and the original
   one in master.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 20212] Slowness in Receiving in Acquisitions

2020-09-21 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20212

--- Comment #66 from Tomás Cohen Arazi  ---
Thanks Andrew, the last version of the patch should cover it.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 20212] Slowness in Receiving in Acquisitions

2020-09-23 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20212

Agustín Moyano  changed:

   What|Removed |Added

 Blocks||8179


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8179
[Bug 8179] Receiving multiple order lines at once
-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 20212] Slowness in Receiving in Acquisitions

2020-10-13 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20212

Martin Renvoize  changed:

   What|Removed |Added

 Attachment #110229|0   |1
is obsolete||

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 20212] Slowness in Receiving in Acquisitions

2020-10-13 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20212

--- Comment #67 from Martin Renvoize  ---
Generally this looks like it's going in the right direction to me.

I do wonder if we could preload the first page of results using the template to
give the appearance of better performance on initial page load whilst still
getting the benefit of serverside processing for the heavy lifting. (As
discussed on Slack, see
https://datatables.net/examples/server_side/defer_loading.html for
possibilities)

However.. I'm not sure the API's is returning the same results as expected...
attaching before and after shots for the table with the exact same database.

The ajax version appears to have considerably more results and many of them
seem to contain malformed 'null' data?

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 20212] Slowness in Receiving in Acquisitions

2020-10-13 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20212

--- Comment #68 from Martin Renvoize  ---
Created attachment 111568
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=111568&action=edit
Screenshot of table after patch

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 20212] Slowness in Receiving in Acquisitions

2020-10-13 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20212

--- Comment #69 from Martin Renvoize  ---
Created attachment 111569
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=111569&action=edit
Screenshot of table before patch

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 20212] Slowness in Receiving in Acquisitions

2020-10-13 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20212

--- Comment #70 from Tomás Cohen Arazi  ---
(In reply to Martin Renvoize from comment #67)
> Generally this looks like it's going in the right direction to me.
> 
> I do wonder if we could preload the first page of results using the template
> to give the appearance of better performance on initial page load whilst
> still getting the benefit of serverside processing for the heavy lifting.
> (As discussed on Slack, see
> https://datatables.net/examples/server_side/defer_loading.html for
> possibilities)

This is really interesting and I will take a look at it for a follow-up
patch/bug depending on the size of it.

> However.. I'm not sure the API's is returning the same results as
> expected... attaching before and after shots for the table with the exact
> same database.
> 
> The ajax version appears to have considerably more results and many of them
> seem to contain malformed 'null' data?

Looking at this, it feels like the original version was hiding the bad rows
(i.e. those orders without a basket, which is not something you can end-up
with) . I consider it a feature LOL.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 20212] Slowness in Receiving in Acquisitions

2020-10-14 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20212

--- Comment #71 from Martin Renvoize  ---
Hmm, I think you're right, it highlights bad data in my test set..  That's
probably a good thing.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 20212] Slowness in Receiving in Acquisitions

2020-10-23 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20212

Tomás Cohen Arazi  changed:

   What|Removed |Added

 Attachment #110482|0   |1
is obsolete||

--- Comment #72 from Tomás Cohen Arazi  ---
Created attachment 112310
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=112310&action=edit
Bug 20212: Use API to render orders datatable

This patch makes the pending orders datatable render using the API
instead of hte old controller script. It implements native server-side
pagination thanks to the API and the datatables wrapper.

On polishing it, we found that data can contain many null values, and it
got dirtier in the process.

This code with all the checks that are done on the data is the result of
testing this dev with real-life production databases, huge ones with
thousands of orderlines.

To test:
1. You should compare the behaviour between this table, and the original
   one in master.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 20212] Slowness in Receiving in Acquisitions

2020-10-23 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20212

--- Comment #73 from Tomás Cohen Arazi  ---
The last patch applies the lessons learned from the libraries page work.
Escaping things, as generic as possible. Handle nulls more gracefully.

Hope you enjoy testing this!

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 20212] Slowness in Receiving in Acquisitions

2020-10-26 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20212

Séverine Queune  changed:

   What|Removed |Added

 Status|Needs Signoff   |Signed Off

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 20212] Slowness in Receiving in Acquisitions

2020-10-26 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20212

Séverine Queune  changed:

   What|Removed |Added

 Attachment #109867|0   |1
is obsolete||

--- Comment #74 from Séverine Queune  ---
Created attachment 112521
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=112521&action=edit
Bug 20212: Add more embeddable objects to orders

This patch adds options to embed more related objects based on the needs
by parcel.tt.

For filtering by biblioitems fields (ISBN and EAN) I had to make the
'list' method a modified version of the objects->search helper. I
thought of doing it in a more generic way but I didn't find any other
use cases and it would certainly make an already complex piece of code
even more complex.

So this is quite similar, but at some steps the biblio. gets translated into the proper relation names, and the same
happens for prefetching.

A new parameter is also added: only_active. It makes the controller use
Koha::Acquisition::Orders->filter_by_active, avoiding the need to build
complex queries in the UI.

The same handling is done when the order_id parameter is passed (outside
the q= parameters). In this case using
Koha::Acquisition::Orders->filter_by_id_including_transfers

This is all respecting the C4::Acquisitions::SearchOrders behaviour.

TL;DR:

This patch adapts the code from the list() sub so it manipulates the
query parameters and the embed header so:
- the biblioitem relationship is prefetch
- any queries on biblio.isbn and biblio.ean are correctly translated into
search on the
  biblioitems table.
- Adds an only_active parameter to the /acquisitions/orders route to
  easily request only the active orders.

Signed-off-by: Séverine QUEUNE 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 20212] Slowness in Receiving in Acquisitions

2020-10-26 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20212

Séverine Queune  changed:

   What|Removed |Added

 Attachment #112310|0   |1
is obsolete||

--- Comment #77 from Séverine Queune  ---
Created attachment 112524
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=112524&action=edit
Bug 20212: Use API to render orders datatable

This patch makes the pending orders datatable render using the API
instead of hte old controller script. It implements native server-side
pagination thanks to the API and the datatables wrapper.

On polishing it, we found that data can contain many null values, and it
got dirtier in the process.

This code with all the checks that are done on the data is the result of
testing this dev with real-life production databases, huge ones with
thousands of orderlines.

To test:
1. You should compare the behaviour between this table, and the original
   one in master.

Signed-off-by: Séverine QUEUNE 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 20212] Slowness in Receiving in Acquisitions

2020-10-26 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20212

Séverine Queune  changed:

   What|Removed |Added

 Attachment #109868|0   |1
is obsolete||

--- Comment #75 from Séverine Queune  ---
Created attachment 112522
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=112522&action=edit
Bug 20212: Clean parcel.pl

Signed-off-by: Tomas Cohen Arazi 
Signed-off-by: Séverine QUEUNE 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 20212] Slowness in Receiving in Acquisitions

2020-10-26 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20212

Séverine Queune  changed:

   What|Removed |Added

 Attachment #109870|0   |1
is obsolete||

--- Comment #76 from Séverine Queune  ---
Created attachment 112523
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=112523&action=edit
Bug 20212: Add missing relation in Biblio

Signed-off-by: Tomas Cohen Arazi 
Signed-off-by: Séverine QUEUNE 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 20212] Slowness in Receiving in Acquisitions

2020-10-29 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20212

Tomás Cohen Arazi  changed:

   What|Removed |Added

 Attachment #112524|0   |1
is obsolete||

--- Comment #78 from Tomás Cohen Arazi  ---
Created attachment 112686
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=112686&action=edit
Bug 20212: Use API to render orders datatable

This patch makes the pending orders datatable render using the API
instead of hte old controller script. It implements native server-side
pagination thanks to the API and the datatables wrapper.

On polishing it, we found that data can contain many null values, and it
got dirtier in the process.

This code with all the checks that are done on the data is the result of
testing this dev with real-life production databases, huge ones with
thousands of orderlines.

To test:
1. You should compare the behaviour between this table, and the original
   one in master.

Signed-off-by: Séverine QUEUNE 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 20212] Slowness in Receiving in Acquisitions

2020-10-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20212

Tomás Cohen Arazi  changed:

   What|Removed |Added

 Attachment #112686|0   |1
is obsolete||

--- Comment #79 from Tomás Cohen Arazi  ---
Created attachment 112695
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=112695&action=edit
Bug 20212: Use API to render orders datatable

This patch makes the pending orders datatable render using the API
instead of hte old controller script. It implements native server-side
pagination thanks to the API and the datatables wrapper.

On polishing it, we found that data can contain many null values, and it
got dirtier in the process.

This code with all the checks that are done on the data is the result of
testing this dev with real-life production databases, huge ones with
thousands of orderlines.

To test:
1. You should compare the behaviour between this table, and the original
   one in master.

Signed-off-by: Séverine QUEUNE 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 20212] Slowness in Receiving in Acquisitions

2020-10-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20212

Andrew Fuerste-Henry  changed:

   What|Removed |Added

 Attachment #112521|0   |1
is obsolete||

--- Comment #80 from Andrew Fuerste-Henry  ---
Created attachment 112698
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=112698&action=edit
Bug 20212: Add more embeddable objects to orders

This patch adds options to embed more related objects based on the needs
by parcel.tt.

For filtering by biblioitems fields (ISBN and EAN) I had to make the
'list' method a modified version of the objects->search helper. I
thought of doing it in a more generic way but I didn't find any other
use cases and it would certainly make an already complex piece of code
even more complex.

So this is quite similar, but at some steps the biblio. gets translated into the proper relation names, and the same
happens for prefetching.

A new parameter is also added: only_active. It makes the controller use
Koha::Acquisition::Orders->filter_by_active, avoiding the need to build
complex queries in the UI.

The same handling is done when the order_id parameter is passed (outside
the q= parameters). In this case using
Koha::Acquisition::Orders->filter_by_id_including_transfers

This is all respecting the C4::Acquisitions::SearchOrders behaviour.

TL;DR:

This patch adapts the code from the list() sub so it manipulates the
query parameters and the embed header so:
- the biblioitem relationship is prefetch
- any queries on biblio.isbn and biblio.ean are correctly translated into
search on the
  biblioitems table.
- Adds an only_active parameter to the /acquisitions/orders route to
  easily request only the active orders.

Signed-off-by: Séverine QUEUNE 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 20212] Slowness in Receiving in Acquisitions

2020-10-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20212

Andrew Fuerste-Henry  changed:

   What|Removed |Added

 Attachment #112522|0   |1
is obsolete||

--- Comment #81 from Andrew Fuerste-Henry  ---
Created attachment 112699
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=112699&action=edit
Bug 20212: Clean parcel.pl

Signed-off-by: Tomas Cohen Arazi 
Signed-off-by: Séverine QUEUNE 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 20212] Slowness in Receiving in Acquisitions

2020-10-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20212

Andrew Fuerste-Henry  changed:

   What|Removed |Added

 Attachment #112523|0   |1
is obsolete||

--- Comment #82 from Andrew Fuerste-Henry  ---
Created attachment 112700
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=112700&action=edit
Bug 20212: Add missing relation in Biblio

Signed-off-by: Tomas Cohen Arazi 
Signed-off-by: Séverine QUEUNE 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 20212] Slowness in Receiving in Acquisitions

2020-10-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20212

Andrew Fuerste-Henry  changed:

   What|Removed |Added

 Attachment #112695|0   |1
is obsolete||

--- Comment #83 from Andrew Fuerste-Henry  ---
Created attachment 112702
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=112702&action=edit
Bug 20212: Use API to render orders datatable

This patch makes the pending orders datatable render using the API
instead of hte old controller script. It implements native server-side
pagination thanks to the API and the datatables wrapper.

On polishing it, we found that data can contain many null values, and it
got dirtier in the process.

This code with all the checks that are done on the data is the result of
testing this dev with real-life production databases, huge ones with
thousands of orderlines.

To test:
1. You should compare the behaviour between this table, and the original
   one in master.

Signed-off-by: Séverine QUEUNE 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 20212] Slowness in Receiving in Acquisitions

2020-10-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20212

Andrew Fuerste-Henry  changed:

   What|Removed |Added

 Attachment #112698|0   |1
is obsolete||

--- Comment #84 from Andrew Fuerste-Henry  ---
Created attachment 112703
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=112703&action=edit
Bug 20212: Add more embeddable objects to orders

This patch adds options to embed more related objects based on the needs
by parcel.tt.

For filtering by biblioitems fields (ISBN and EAN) I had to make the
'list' method a modified version of the objects->search helper. I
thought of doing it in a more generic way but I didn't find any other
use cases and it would certainly make an already complex piece of code
even more complex.

So this is quite similar, but at some steps the biblio. gets translated into the proper relation names, and the same
happens for prefetching.

A new parameter is also added: only_active. It makes the controller use
Koha::Acquisition::Orders->filter_by_active, avoiding the need to build
complex queries in the UI.

The same handling is done when the order_id parameter is passed (outside
the q= parameters). In this case using
Koha::Acquisition::Orders->filter_by_id_including_transfers

This is all respecting the C4::Acquisitions::SearchOrders behaviour.

TL;DR:

This patch adapts the code from the list() sub so it manipulates the
query parameters and the embed header so:
- the biblioitem relationship is prefetch
- any queries on biblio.isbn and biblio.ean are correctly translated into
search on the
  biblioitems table.
- Adds an only_active parameter to the /acquisitions/orders route to
  easily request only the active orders.

Signed-off-by: Séverine QUEUNE 

Signed-off-by: Andrew Fuerste-Henry 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 20212] Slowness in Receiving in Acquisitions

2020-10-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20212

Andrew Fuerste-Henry  changed:

   What|Removed |Added

 Attachment #112699|0   |1
is obsolete||

--- Comment #85 from Andrew Fuerste-Henry  ---
Created attachment 112704
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=112704&action=edit
Bug 20212: Clean parcel.pl

Signed-off-by: Tomas Cohen Arazi 
Signed-off-by: Séverine QUEUNE 

Signed-off-by: Andrew Fuerste-Henry 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 20212] Slowness in Receiving in Acquisitions

2020-10-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20212

Andrew Fuerste-Henry  changed:

   What|Removed |Added

 Attachment #112700|0   |1
is obsolete||

--- Comment #86 from Andrew Fuerste-Henry  ---
Created attachment 112705
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=112705&action=edit
Bug 20212: Add missing relation in Biblio

Signed-off-by: Tomas Cohen Arazi 
Signed-off-by: Séverine QUEUNE 

Signed-off-by: Andrew Fuerste-Henry 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 20212] Slowness in Receiving in Acquisitions

2020-10-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20212

Andrew Fuerste-Henry  changed:

   What|Removed |Added

 Attachment #112702|0   |1
is obsolete||

--- Comment #87 from Andrew Fuerste-Henry  ---
Created attachment 112706
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=112706&action=edit
Bug 20212: Use API to render orders datatable

This patch makes the pending orders datatable render using the API
instead of hte old controller script. It implements native server-side
pagination thanks to the API and the datatables wrapper.

On polishing it, we found that data can contain many null values, and it
got dirtier in the process.

This code with all the checks that are done on the data is the result of
testing this dev with real-life production databases, huge ones with
thousands of orderlines.

To test:
1. You should compare the behaviour between this table, and the original
   one in master.

Signed-off-by: Séverine QUEUNE 

Signed-off-by: Andrew Fuerste-Henry 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 20212] Slowness in Receiving in Acquisitions

2020-10-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20212

--- Comment #88 from Tomás Cohen Arazi  ---
Thanks, Andrew. It's been a very nice testing session, and the things you found
were really helpful to make this solid!

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 20212] Slowness in receiving in acquisitions

2020-11-01 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20212

Katrin Fischer  changed:

   What|Removed |Added

Summary|Slowness in Receiving in|Slowness in receiving in
   |Acquisitions|acquisitions

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 20212] Slowness in Receiving in Acquisitions

2020-11-01 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20212

Katrin Fischer  changed:

   What|Removed |Added

 Status|Signed Off  |Failed QA

--- Comment #89 from Katrin Fischer  ---
I am kind of missing unit tests here for the new and changed subs?

There is also an issue here in that the search terms from the left side search
or the table search are no longer retained.

To test:
- Enter a search term in either of the search fields
- Add a note, receive or do another action
- The search term is kept
- Apply this patch set
- Repeat actions
- The search term is now lost

Especially when dealing with a long list of orders this is an important
feature.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 20212] Slowness in receiving in acquisitions

2020-11-01 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20212

--- Comment #90 from Tomás Cohen Arazi  ---
(In reply to Katrin Fischer from comment #89)
> I am kind of missing unit tests here for the new and changed subs?

Which ones?

> There is also an issue here in that the search terms from the left side
> search or the table search are no longer retained.
> 
> To test:
> - Enter a search term in either of the search fields
> - Add a note, receive or do another action
> - The search term is kept
> - Apply this patch set
> - Repeat actions
> - The search term is now lost
> 
> Especially when dealing with a long list of orders this is an important
> feature.

This is paired with the multiple receive patches (dependency) but I see this
would be a blocker. I will provide a follow-up to retain that feature in the
meantime.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 20212] Slowness in receiving in acquisitions

2020-11-02 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20212

--- Comment #91 from Tomás Cohen Arazi  ---
Created attachment 112868
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=112868&action=edit
Bug 20212: (QA follow-up) Remember current filter

This patch restores the original behaviour: if you jump into receiving
an order, and then go back to receiving, you want the page to remember
your filters.

This feature was overlooked. On fixing it, I wrapped some JS code in a
function for reusing it and simplified it a bit as well.

To test:
1. Enter a search term in either of the search fields
2. Add a note, receive or do another action
=> SUCCESS: The search term is kept
3. Apply this patch set
4. Repeat 2
=> SUCCESS: The search term is kept

Signed-off-by: Tomas Cohen Arazi 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 20212] Slowness in receiving in acquisitions

2020-11-02 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20212

Tomás Cohen Arazi  changed:

   What|Removed |Added

 Status|Failed QA   |Signed Off

--- Comment #92 from Tomás Cohen Arazi  ---
Katrin, I've submitted a follow-up for fixing the problem with remembering
searches.

As for the regression tests, what I did was embedding the objects->search code
in the controller, so I can tweak the handling for biblioitems.* fields in the
query, because biblio objects include the biblioitems columns, so a special
handling is required until we merge those tables (or not). So my feeling was
that the fact that running:

$ kshell
   k$ prove t/db_dependent/api/v1/acquisitions_orders.t

was passing, was enough.

I can try adding tests for filtering on biblioitems.* fields, but the general
tests cover the routes already.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 20212] Slowness in receiving in acquisitions

2020-11-02 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20212

--- Comment #93 from Tomás Cohen Arazi  ---
Created attachment 112882
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=112882&action=edit
Bug 20212: Controller changes regression tests

This patchset did a copy and paste of the objects->search helper inside
the controller, to handle a very special case that wasn't worth
generalizing: the fact that the biblio object (that this patchset makes
embeddable) is actually built from two tables, and we want to filter by
fields in both tables.

This requires us to translate:
- Any filter reference to fields in biblioitems we allow to search on, through
  an allow list.
- For filtering to work, we need to tweak the stashed 'embed' object so
  the prefetch is done correctly

This patchset also adds a new query parameter: only_active. It is used
to only request active orders (see the spec for more details).

This patch adds tests for:
- Filtering by a column in bilbioitems (this implies correctly
  prefetching the bilbio => biblioitems relation, and translating the
  filtering parameter.
- Using the only_active query parameter to retrieve only active orders

To test:
1. Apply this patchset
2. Run:
   $ kshell
  k$ prove t/db_dependent/api/v1/acquisitions_orders.t
=> SUCCESS: Tests pass!
3. Verify the tests check for the explained behaviours.
=> SUCCESS: They do!
4. Sign off :-D

Signed-off-by: Tomas Cohen Arazi 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 20212] Slowness in receiving in acquisitions

2020-11-03 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20212

--- Comment #94 from Katrin Fischer  ---
There still appears to be some regression :( 

- The filters on the datatable are no longer kept 
- and the column filters have vanished altogether

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 20212] Slowness in receiving in acquisitions

2020-11-03 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20212

Katrin Fischer  changed:

   What|Removed |Added

 Status|Signed Off  |Failed QA

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 20212] Slowness in receiving in acquisitions

2020-11-03 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20212

--- Comment #95 from Tomás Cohen Arazi  ---
(In reply to Katrin Fischer from comment #94)
> There still appears to be some regression :( 
> 
> - The filters on the datatable are no longer kept

Is that a thing in master?? I don't recall seeing code related to that.

> - and the column filters have vanished altogether

Do we miss them?

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 20212] Slowness in receiving in acquisitions

2020-11-03 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20212

--- Comment #96 from Katrin Fischer  ---
(In reply to Tomás Cohen Arazi from comment #95)
> (In reply to Katrin Fischer from comment #94)
> > There still appears to be some regression :( 
> > 
> > - The filters on the datatable are no longer kept
> 
> Is that a thing in master?? I don't recall seeing code related to that.

I tested and yes, it worked in my tests. I had also noted it in comment#89 "or
the table search".

>  
> > - and the column filters have vanished altogether
> 
> Do we miss them?

They allow filtering on aspects that cannot be searched otherwise - I believe
they would be missed.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 20212] Slowness in receiving in acquisitions

2020-11-04 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20212

--- Comment #97 from Tomás Cohen Arazi  ---
Created attachment 112987
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=112987&action=edit
Bug 20212: (QA follow-up) Restore table filter sticky

Signed-off-by: Tomas Cohen Arazi 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 20212] Slowness in receiving in acquisitions

2020-11-04 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20212

--- Comment #98 from Martin Renvoize  ---
I'm sure we can restore the column filters as a followup.. I was hoping to see
this in the queue for this release.  Getting stuck this close to the deadline
is plain disheartening :(

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 20212] Slowness in receiving in acquisitions

2020-11-04 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20212

--- Comment #99 from Andrew Fuerste-Henry  ---
> They allow filtering on aspects that cannot be searched otherwise - I
> believe they would be missed.

Testing this, it seems that on current code the main search box above the
pending orders table is capable of searching every column in that table except
the fund.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 20212] Slowness in receiving in acquisitions

2020-11-04 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20212

--- Comment #100 from Tomás Cohen Arazi  ---
(In reply to Andrew Fuerste-Henry from comment #99)
> > They allow filtering on aspects that cannot be searched otherwise - I
> > believe they would be missed.
> 
> Testing this, it seems that on current code the main search box above the
> pending orders table is capable of searching every column in that table
> except the fund.

Good catch!

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 20212] Slowness in receiving in acquisitions

2020-11-04 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20212

--- Comment #101 from Tomás Cohen Arazi  ---
I have a question about column filtering.

The current code fetches all orders and then provides a 'string search' on the
columns, based on the data there's on them.

How would it work for numbers? If we translate that to a DB query, how would
you say it should be done? Treat them as strings and '%%'?

I ask this because I don't know what is expected.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 20212] Slowness in receiving in acquisitions

2021-03-19 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20212

Fridolin Somers  changed:

   What|Removed |Added

 Blocks||27930


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27930
[Bug 27930] Move _escape_* functions from acq/parcel.tt to be re-usable
-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 20212] Slowness in receiving in acquisitions

2021-04-29 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20212

Tomás Cohen Arazi  changed:

   What|Removed |Added

   See Also||https://bugs.koha-community
   ||.org/bugzilla3/show_bug.cgi
   ||?id=28248

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 20212] Slowness in receiving in acquisitions

2021-05-25 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20212

Jonathan Druart  changed:

   What|Removed |Added

  Text to go in the|This development changes|This development changes
  release notes|how the orders table on |how the orders table on
   |receiving in acquisitions   |receiving in acquisitions
   |is rendered.
   |is rendered.
   |Before this |Before this
   |patches all active orders   |patches all active orders
   |data was fetched from the   |data was fetched from the
   |database, along with all|database, along with all
   |the related data (patrons,  |the related data (patrons,
   |biblio). This lead to   |biblio). This lead to
   |significant delays because  |significant delays because
   |all orders matching the |all orders matching the
   |filtering criteria were |filtering criteria were
   |loaded, even when only 20   |loaded, even when only 20
   |rows are displayed on the   |rows are displayed on the
   |UI.
|UI.
   |With this patch, the|With this patch, the
   |table is rendering using|table is rendering using
   |server-side pagination, |server-side pagination,
   |provided by the REST API.   |provided by the REST API.
   |This means
 |This means
   |(1) only the|(1) only the
   |information to be rendered  |information to be rendered
   |is fetched (faster drawing  |is fetched (faster drawing
   |(2) the page doesn't reload |(2) the page doesn't reload
   |anymore when a new filter   |anymore when a new filter
   |is added: it just refreshes |is added: it just refreshes
   |the table, very fastly.
|the table, very fastly.
   ||
   |Sponsored-by: Camden County |Sponsored by: Camden County
   |Library System  |Library System
   |Sponsored-by: ByWater   |
   |Solutions   |Sponsored
   ||by: ByWater Solutions

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 20212] Slowness in receiving in acquisitions

2021-05-25 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20212

Jonathan Druart  changed:

   What|Removed |Added

  Text to go in the|This development changes|This development changes
  release notes|how the orders table on |how the orders table on
   |receiving in acquisitions   |receiving in acquisitions
   |is rendered.
   |is rendered.
   |Before this |Before these
   |patches all active orders   |patches all active orders
   |data was fetched from the   |data was fetched from the
   |database, along with all|database, along with all
   |the related data (patrons,  |the related data (patrons,
   |biblio). This lead to   |biblio). This leads to
   |significant delays because  |significant delays because
   |all orders matching the |all orders matching the
   |filtering criteria were |filtering criteria were
   |loaded, even when only 20   |loaded, even when only 20
   |rows are displayed on the   |rows were displayed on the
   |UI.
|UI.
   |With this patch, the|With this patch, the
   |table is rendering using|table is rendering using
   |server-side pagination, |server-side pagination,
   |provided by the REST API.   |provided by the REST API.
   |This means
 |This means
   |(1) only the|(1) only the
   |information to be rendered  |information to be rendered
   |is fetched (faster drawing  |is fetched (faster drawing
   |(2) the page doesn't reload |(2) the page doesn't reload
   |anymore when a new filter   |anymore when a new filter
   |is added: it just refreshes |is added: it just refreshes
   |the table, very fastly.
|the table, very fastly.
   ||
   |Sponsored by: Camden County |Sponsored by: Camden County
   |Library System
 |Library System
   |
   |
   |Sponsored   |Sponsored
   |by: ByWater Solutions   |by: ByWater Solutions

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 20212] Slowness in receiving in acquisitions

2021-05-25 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20212

Jonathan Druart  changed:

   What|Removed |Added

   Severity|enhancement |new feature

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 20212] Slowness in receiving in acquisitions

2020-11-06 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20212

--- Comment #102 from Tomás Cohen Arazi  ---
Created attachment 113278
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=113278&action=edit
Bug 20212: (QA follow-up) Resurrect column filtering

This patch adds per-column filtering to the order receiving table.

The order cost column proved difficult to filter, because of the syntax
DBIC requires for comparing replacement_cost * quantity, and passing
that all the way down from the API request to DBIC itself.

I'm still looking for options.

Signed-off-by: Tomas Cohen Arazi 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 20212] Slowness in receiving in acquisitions

2020-11-06 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20212

Tomás Cohen Arazi  changed:

   What|Removed |Added

 Status|Failed QA   |Signed Off

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 20212] Slowness in receiving in acquisitions

2020-11-06 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20212

--- Comment #103 from Tomás Cohen Arazi  ---
Created attachment 113279
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=113279&action=edit
Bug 20212: Make all biblioitems.* fields searchable

Prior to this bug, only a few bilbio fields were actually searchable through
the orders API. This patch adds all of them to the mapping, so other
pages can take advantage of them.

My first approach was to add things as needed. But this is trivial to
make complete.

Signed-off-by: Tomas Cohen Arazi 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 20212] Slowness in receiving in acquisitions

2020-11-06 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20212

--- Comment #104 from Tomás Cohen Arazi  ---
(In reply to Andrew Fuerste-Henry from comment #99)
> > They allow filtering on aspects that cannot be searched otherwise - I
> > believe they would be missed.
> 
> Testing this, it seems that on current code the main search box above the
> pending orders table is capable of searching every column in that table
> except the fund.

I also noticed the main search box doesn't search on:
- internal_note
- vendor_note
- isbn
- publisher
- publication_date
- copyright_date
- suggester.surname
- suggester.firtname

Do we need to add them?

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 20212] Slowness in receiving in acquisitions

2020-12-22 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20212

Martin Renvoize  changed:

   What|Removed |Added

 Attachment #112703|0   |1
is obsolete||

--- Comment #105 from Martin Renvoize  ---
Created attachment 114607
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=114607&action=edit
Bug 20212: Add more embeddable objects to orders

This patch adds options to embed more related objects based on the needs
by parcel.tt.

For filtering by biblioitems fields (ISBN and EAN) I had to make the
'list' method a modified version of the objects->search helper. I
thought of doing it in a more generic way but I didn't find any other
use cases and it would certainly make an already complex piece of code
even more complex.

So this is quite similar, but at some steps the biblio. gets translated into the proper relation names, and the same
happens for prefetching.

A new parameter is also added: only_active. It makes the controller use
Koha::Acquisition::Orders->filter_by_active, avoiding the need to build
complex queries in the UI.

The same handling is done when the order_id parameter is passed (outside
the q= parameters). In this case using
Koha::Acquisition::Orders->filter_by_id_including_transfers

This is all respecting the C4::Acquisitions::SearchOrders behaviour.

TL;DR:

This patch adapts the code from the list() sub so it manipulates the
query parameters and the embed header so:
- the biblioitem relationship is prefetch
- any queries on biblio.isbn and biblio.ean are correctly translated into
search on the
  biblioitems table.
- Adds an only_active parameter to the /acquisitions/orders route to
  easily request only the active orders.

Signed-off-by: Séverine QUEUNE 
Signed-off-by: Andrew Fuerste-Henry 
Signed-off-by: Martin Renvoize 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 20212] Slowness in receiving in acquisitions

2020-12-22 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20212

Martin Renvoize  changed:

   What|Removed |Added

 Attachment #112704|0   |1
is obsolete||

--- Comment #106 from Martin Renvoize  ---
Created attachment 114608
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=114608&action=edit
Bug 20212: Clean parcel.pl

Signed-off-by: Tomas Cohen Arazi 
Signed-off-by: Séverine QUEUNE 
Signed-off-by: Andrew Fuerste-Henry 
Signed-off-by: Martin Renvoize 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 20212] Slowness in receiving in acquisitions

2020-12-22 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20212

Martin Renvoize  changed:

   What|Removed |Added

 Attachment #112705|0   |1
is obsolete||

--- Comment #107 from Martin Renvoize  ---
Created attachment 114609
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=114609&action=edit
Bug 20212: Add missing relation in Biblio

Signed-off-by: Tomas Cohen Arazi 
Signed-off-by: Séverine QUEUNE 
Signed-off-by: Andrew Fuerste-Henry 
Signed-off-by: Martin Renvoize 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 20212] Slowness in receiving in acquisitions

2020-12-22 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20212

Martin Renvoize  changed:

   What|Removed |Added

 Attachment #112706|0   |1
is obsolete||

--- Comment #108 from Martin Renvoize  ---
Created attachment 114610
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=114610&action=edit
Bug 20212: Use API to render orders datatable

This patch makes the pending orders datatable render using the API
instead of hte old controller script. It implements native server-side
pagination thanks to the API and the datatables wrapper.

On polishing it, we found that data can contain many null values, and it
got dirtier in the process.

This code with all the checks that are done on the data is the result of
testing this dev with real-life production databases, huge ones with
thousands of orderlines.

To test:
1. You should compare the behaviour between this table, and the original
   one in master.

Signed-off-by: Séverine QUEUNE 
Signed-off-by: Andrew Fuerste-Henry 
Signed-off-by: Martin Renvoize 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 20212] Slowness in receiving in acquisitions

2020-12-22 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20212

Martin Renvoize  changed:

   What|Removed |Added

 Attachment #112868|0   |1
is obsolete||

--- Comment #109 from Martin Renvoize  ---
Created attachment 114611
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=114611&action=edit
Bug 20212: (QA follow-up) Remember current filter

This patch restores the original behaviour: if you jump into receiving
an order, and then go back to receiving, you want the page to remember
your filters.

This feature was overlooked. On fixing it, I wrapped some JS code in a
function for reusing it and simplified it a bit as well.

To test:
1. Enter a search term in either of the search fields
2. Add a note, receive or do another action
=> SUCCESS: The search term is kept
3. Apply this patch set
4. Repeat 2
=> SUCCESS: The search term is kept

Signed-off-by: Tomas Cohen Arazi 
Signed-off-by: Martin Renvoize 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 20212] Slowness in receiving in acquisitions

2020-12-22 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20212

Martin Renvoize  changed:

   What|Removed |Added

 Attachment #112882|0   |1
is obsolete||

--- Comment #110 from Martin Renvoize  ---
Created attachment 114612
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=114612&action=edit
Bug 20212: Controller changes regression tests

This patchset did a copy and paste of the objects->search helper inside
the controller, to handle a very special case that wasn't worth
generalizing: the fact that the biblio object (that this patchset makes
embeddable) is actually built from two tables, and we want to filter by
fields in both tables.

This requires us to translate:
- Any filter reference to fields in biblioitems we allow to search on, through
  an allow list.
- For filtering to work, we need to tweak the stashed 'embed' object so
  the prefetch is done correctly

This patchset also adds a new query parameter: only_active. It is used
to only request active orders (see the spec for more details).

This patch adds tests for:
- Filtering by a column in bilbioitems (this implies correctly
  prefetching the bilbio => biblioitems relation, and translating the
  filtering parameter.
- Using the only_active query parameter to retrieve only active orders

To test:
1. Apply this patchset
2. Run:
   $ kshell
  k$ prove t/db_dependent/api/v1/acquisitions_orders.t
=> SUCCESS: Tests pass!
3. Verify the tests check for the explained behaviours.
=> SUCCESS: They do!
4. Sign off :-D

Signed-off-by: Tomas Cohen Arazi 
Signed-off-by: Martin Renvoize 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 20212] Slowness in receiving in acquisitions

2020-12-22 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20212

Martin Renvoize  changed:

   What|Removed |Added

 Attachment #112987|0   |1
is obsolete||

--- Comment #111 from Martin Renvoize  ---
Created attachment 114613
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=114613&action=edit
Bug 20212: (QA follow-up) Restore table filter sticky

Signed-off-by: Tomas Cohen Arazi 
Signed-off-by: Martin Renvoize 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 20212] Slowness in receiving in acquisitions

2020-12-22 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20212

Martin Renvoize  changed:

   What|Removed |Added

 Attachment #113278|0   |1
is obsolete||

--- Comment #112 from Martin Renvoize  ---
Created attachment 114614
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=114614&action=edit
Bug 20212: (QA follow-up) Resurrect column filtering

This patch adds per-column filtering to the order receiving table.

The order cost column proved difficult to filter, because of the syntax
DBIC requires for comparing replacement_cost * quantity, and passing
that all the way down from the API request to DBIC itself.

I'm still looking for options.

Signed-off-by: Tomas Cohen Arazi 
Signed-off-by: Martin Renvoize 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 20212] Slowness in receiving in acquisitions

2020-12-22 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20212

Martin Renvoize  changed:

   What|Removed |Added

 Attachment #113279|0   |1
is obsolete||

--- Comment #113 from Martin Renvoize  ---
Created attachment 114615
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=114615&action=edit
Bug 20212: Make all biblioitems.* fields searchable

Prior to this bug, only a few bilbio fields were actually searchable through
the orders API. This patch adds all of them to the mapping, so other
pages can take advantage of them.

My first approach was to add things as needed. But this is trivial to
make complete.

Signed-off-by: Tomas Cohen Arazi 
Signed-off-by: Martin Renvoize 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 20212] Slowness in receiving in acquisitions

2020-12-22 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20212

--- Comment #114 from Martin Renvoize  ---
Created attachment 114616
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=114616&action=edit
Bug 20212: (QA follow-up) Restore missing comma

Signed-off-by: Martin Renvoize 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 20212] Slowness in receiving in acquisitions

2020-12-22 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20212

--- Comment #115 from Martin Renvoize  ---
Created attachment 114617
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=114617&action=edit
Bug 20212: (QA follow-up) Spelling typo fix

Signed-off-by: Martin Renvoize 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 20212] Slowness in receiving in acquisitions

2020-12-22 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20212

Martin Renvoize  changed:

   What|Removed |Added

 Status|Signed Off  |Passed QA

--- Comment #116 from Martin Renvoize  ---
Works as expected. No regressions found and QA script is happy.

Passing QA

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 20212] Slowness in receiving in acquisitions

2021-01-04 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20212

Jonathan Druart  changed:

   What|Removed |Added

 CC||jonathan.dru...@bugs.koha-c
   ||ommunity.org
   Keywords||release-notes-needed

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 20212] Slowness in receiving in acquisitions

2021-01-05 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20212

Tomás Cohen Arazi  changed:

   What|Removed |Added

 QA Contact|testo...@bugs.koha-communit |martin.renvoize@ptfs-europe
   |y.org   |.com

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 20212] Slowness in receiving in acquisitions

2021-01-05 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20212

Tomás Cohen Arazi  changed:

   What|Removed |Added

  Text to go in the||This development changes
  release notes||how the orders table on
   ||receiving in acquisitions
   ||is rendered.
   ||Before this
   ||patches all active orders
   ||data was fetched from the
   ||database, along with all
   ||the related data (patrons,
   ||biblio). This lead to
   ||significant delays because
   ||all orders matching the
   ||filtering criteria were
   ||loaded, even when only 20
   ||rows are displayed on the
   ||UI.
   ||With this patch, the
   ||table is rendering using
   ||server-side pagination,
   ||provided by the REST API.
   ||This means
   ||(1) only the
   ||information to be rendered
   ||is fetched (faster drawing
   ||(2) the page doesn't reload
   ||anymore when a new filter
   ||is added: it just refreshes
   ||the table, very fastly.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 20212] Slowness in receiving in acquisitions

2021-01-05 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20212

Nick Clemens  changed:

   What|Removed |Added

 CC||n...@bywatersolutions.com
   Keywords|release-notes-needed|

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 20212] Slowness in receiving in acquisitions

2021-01-07 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20212

Jonathan Druart  changed:

   What|Removed |Added

 Status|Passed QA   |Failed QA

--- Comment #117 from Jonathan Druart  
---
1. We need a delay between the different AJAX request when filtering the table,
otherwise we face weird behaviour and lag (server and browser)

2. Prior to this patch, the "pending orders" table contained orders with status
(orderstatus) set to "ordered" or "partial". Now we see them all.
See 'pending' and 'ordered' flag of SearchOrders

3. Not blocker but worth noting, we lost the column filter on "Order cost"

4. I don't understand how works the column filters. It's the first view where
we introduce it. It would have been interesting to have it on a simpler view
(cities?) to understand how it is working.

There is this code:
793 // column filter events handling
794 $(".column-filter").each(function () {
795 $(this).on( 'keyup change', function () {

It's like we are not using the DT standard way of using column filtering.

5. Code to build the URI is c/p in
794 $(".column-filter").each(function () {
and
809 $("#filterform").on("submit", function(e) {

6. In the schema:

+__PACKAGE__->has_many(
+  "biblioitem",
+  "Koha::Schema::Result::Biblioitem",
+  { "foreign.biblionumber" => "self.biblionumber" },
+  { cascade_copy => 0, cascade_delete => 0 },
+);

Why has_many? Why cascade_delete => 0?

7. Not blocker for now, but I think we need some JS functions to display
variables coming from the REST API.
For instance this code appears a lot:
  if ( data != null ) {
return data.escapeHtml().format_price();
  }
  else {
return "";
  }

or

  if ( data == null ) {
return "";
  }
  else {
return data;
  }

8. In the "render" you have
  if ( type != 'display' ) {
Why are you testing that?
The different values are sorting, filtering and display. According to the doc 
https://datatables.net/reference/option/columns.render

9. There are several places where strings are not escaped

At least 2 examples:

+return ""
++ row.basket.basket_group.name + " (" +
row.basket.basket_group_id + ")";


+return ""
+ data + " (" + row.basket.basket_id + ")";


Side notes (and my opinion), I don't think we are going into the right
direction. The JS code we are adding in our template is not robust, hard to
read, and so hard to maintain.
Also we will have to rewrite things we have done in TT, like display of
patron's name for instance (patron-title.inc).
I really would like to see some efforts in improving the readability of the
code we have already before adding more.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 20212] Slowness in receiving in acquisitions

2021-01-07 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20212

--- Comment #118 from Tomás Cohen Arazi  ---
(In reply to Jonathan Druart from comment #117)
> 1. We need a delay between the different AJAX request when filtering the
> table, otherwise we face weird behaviour and lag (server and browser)

I will look into that. I understand you're referring to the columns filters.

> 2. Prior to this patch, the "pending orders" table contained orders with
> status (orderstatus) set to "ordered" or "partial". Now we see them all.
> See 'pending' and 'ordered' flag of SearchOrders

That's odd, actually. What we do in the controller:

+if ( $only_active ) {
+$orders_rs = Koha::Acquisition::Orders->filter_by_active;
+}

which in turn

+sub filter_by_active {
+my ($self) = @_;
+return $self->search(
+{
+orderstatus => [ 'new', 'ordered', 'partial' ]
+}
+);
+}

should take care of that. Maybe we are loosing the only_active query param
somewhere. Worth checking.

Also, maybe there's something wrong when it comes to partially received orders.
It would be a problem with bug 25670.

> 3. Not blocker but worth noting, we lost the column filter on "Order cost"

That worked just fine because all data was loaded on the DataTable. If this is
a problem, we could add a special munging to the query parameters so it builds
the multiply on the query. I didn't consider it that important.

> 4. I don't understand how works the column filters. It's the first view
> where we introduce it. It would have been interesting to have it on a
> simpler view (cities?) to understand how it is working.
> 
> There is this code:
> 793 // column filter events handling
> 794 $(".column-filter").each(function () {
> 795 $(this).on( 'keyup change', function () {
> 
> It's like we are not using the DT standard way of using column filtering.

This is related to (1). Will take a look.

> 5. Code to build the URI is c/p in
> 794 $(".column-filter").each(function () {
> and
> 809 $("#filterform").on("submit", function(e) {

It is not exactly the same. I think it is fine as-is.

> 6. In the schema:
> 
> +__PACKAGE__->has_many(
> +  "biblioitem",
> +  "Koha::Schema::Result::Biblioitem",
> +  { "foreign.biblionumber" => "self.biblionumber" },
> +  { cascade_copy => 0, cascade_delete => 0 },
> +);
> 
> Why has_many? Why cascade_delete => 0?

This is just having an alias for the already existing relationship. I consider
it correct as it is what we have already defined in the schema. I don't mind
changing it anyway.

> 7. Not blocker for now, but I think we need some JS functions to display
> variables coming from the REST API.
> For instance this code appears a lot:
>   if ( data != null ) {
> return data.escapeHtml().format_price();
>   }
>   else {
> return "";
>   }
> 
> or
> 
>   if ( data == null ) {
> return "";
>   }
>   else {
> return data;
>   }

I agree. But it is small enough anyway. Truth is, we do the same in Perl.
Specially when it comes to rendering undef.

> 8. In the "render" you have
>   if ( type != 'display' ) {
> Why are you testing that?
> The different values are sorting, filtering and display. According to the
> doc 
> https://datatables.net/reference/option/columns.render

Usually, it is to leave the data untouched if is not for display, and tweak it
for display. Not sure about each specific case you're referring to.

> 9. There are several places where strings are not escaped
> 
> At least 2 examples:
> 
> +return " href=\"/cgi-bin/koha/acqui/basketgroup.pl?op=add&booksellerid="
> ++ row.basket.vendor_id +
> "&basketgroupid="
> ++ row.basket.basket_group_id + "\">"
> ++ row.basket.basket_group.name + " (" +
> row.basket.basket_group_id + ")";
> 
> 
> +return " href=\"/cgi-bin/koha/acqui/basket.pl?basketno=" + row.basket.basket_id +
> "\">" + data + " (" + row.basket.basket_id + ")";

I'm not sure why those slipped in, but is probably a bad rebase. I'll fix them.

> Side notes (and my opinion), I don't think we are going into the right
> direction. The JS code we are adding in our template is not robust, hard to
> read, and so hard to maintain.
> Also we will have to rewrite things we have done in TT, like display of
> patron's name for instance (patron-title.inc).
> I really would like to see some efforts in improving the readability of the
> code we have already before adding more.

We really need to adopt a JS framework for dealing with the UI. Modern
frameworks fit well with APIs like the one we are writing.

I find myself (again) in the chicken-egg situation regarding this bug. When the
first routes were pushed, we just built hashrefs on the controllers and
returned them. We've come a long way from that point, with magic stu

[Koha-bugs] [Bug 20212] Slowness in receiving in acquisitions

2021-01-07 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20212

--- Comment #119 from Katrin Fischer  ---
For the status question... I believe new orders should only show if they are
standing orders. I haven't tracked if there was a change, but we used to only
show ordered and partial - must have changed with standing orders or for them.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 20212] Slowness in receiving in acquisitions

2021-01-07 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20212

--- Comment #120 from Tomás Cohen Arazi  ---
(In reply to Katrin Fischer from comment #119)
> For the status question... I believe new orders should only show if they are
> standing orders. I haven't tracked if there was a change, but we used to
> only show ordered and partial - must have changed with standing orders or
> for them.

Ha! That's it. I'll try to solve that on bug 25670.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 20212] Slowness in receiving in acquisitions

2021-01-07 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20212

--- Comment #121 from Tomás Cohen Arazi  ---
(In reply to Katrin Fischer from comment #119)
> For the status question... I believe new orders should only show if they are
> standing orders. I haven't tracked if there was a change, but we used to
> only show ordered and partial - must have changed with standing orders or
> for them.

Katrina, thanks for that explanation. I've just submitted a follow-up on bug
25670 capturing this behavior, which was actually clear in SearchOrders. I
added regression tests as well.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 20212] Slowness in receiving in acquisitions

2021-01-07 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20212

--- Comment #122 from Tomás Cohen Arazi  ---
Created attachment 114942
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=114942&action=edit
Bug 20212: (QA follow-up) Fix escaping

Signed-off-by: Tomas Cohen Arazi 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


  1   2   3   4   >