[Koha-bugs] [Bug 26143] The API does not handle requesting all resources

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

Tomás Cohen Arazi  changed:

   What|Removed |Added

 Depends on||25570


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25570
[Bug 25570] Listing requests should be paginated by default
-- 
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 26143] The API does not handle requesting all resources

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

Victor Grousset/tuxayo  changed:

   What|Removed |Added

 CC||vic...@tuxayo.net

--- Comment #13 from Victor Grousset/tuxayo  ---
Couldn't backport to 19.05.x
Conflicts weren't an issue but the last test fails.
If there is an interest in having this backported, feel free to submit a patch
for 19.05.

kohadev-koha@b206c3f13d4a:/kohadevbox/koha$ prove
t/Koha/REST/Plugin/Pagination.t t/db_dependent/Koha/REST/Plugin/Objects.t
t/Koha/REST/Plugin/Pagination.t  ok   
t/db_dependent/Koha/REST/Plugin/Objects.t .. 
#   Failed test '_per_page=-1 means all resources'
#   at t/db_dependent/Koha/REST/Plugin/Objects.t line 266.
#  got: '23'
# expected: '24'

#   Failed test 'When _per_page=-1 the page param is not considered'
#   at t/db_dependent/Koha/REST/Plugin/Objects.t line 272.
#  got: '23'
# expected: '24'
# Looks like you failed 2 tests of 102.
t/db_dependent/Koha/REST/Plugin/Objects.t .. 1/2 
#   Failed test 'objects.search helper'
#   at t/db_dependent/Koha/REST/Plugin/Objects.t line 275.
# Looks like you failed 1 test of 2.
t/db_dependent/Koha/REST/Plugin/Objects.t .. Dubious, test returned 1 (wstat
256, 0x100)
Failed 1/2 subtests 

Test Summary Report
---
t/db_dependent/Koha/REST/Plugin/Objects.t (Wstat: 256 Tests: 2 Failed: 1)
  Failed test:  1
  Non-zero exit status: 1
Files=2, Tests=4,  4 wallclock secs ( 0.04 usr  0.02 sys +  3.18 cusr  0.41
csys =  3.65 CPU)
Result: FAIL

-- 
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 26143] The API does not handle requesting all resources

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

Aleisha Amohia  changed:

   What|Removed |Added

 Version(s)|20.11.00, 20.05.03  |20.11.00, 20.05.03,
released in||19.11.09
 Status|Pushed to stable|Pushed to oldstable
 CC||alei...@catalyst.net.nz

--- Comment #12 from Aleisha Amohia  ---
backported to 19.11.x for 19.11.09

-- 
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 26143] The API does not handle requesting all resources

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

Lucas Gass  changed:

   What|Removed |Added

 Status|Pushed to master|Pushed to stable
 CC||lu...@bywatersolutions.com
 Version(s)|20.11.00|20.11.00, 20.05.03
released in||

--- Comment #11 from Lucas Gass  ---
backported to 20.05.x for 20.05.03

-- 
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 26143] The API does not handle requesting all resources

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

Jonathan Druart  changed:

   What|Removed |Added

 Blocks||26162

--- Comment #10 from Jonathan Druart  
---
Opened bug 26162


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26162
[Bug 26162] Prevent Selenium's StaleElementReferenceException
-- 
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 26143] The API does not handle requesting all resources

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

--- Comment #9 from Jonathan Druart  
---
Again Master_D11 #57

-- 
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 26143] The API does not handle requesting all resources

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

--- Comment #8 from Jonathan Druart  
---
Got something new on Master_U18 #862, I am still not sure it's directly related
to this.


18:47:07 selenium_1   | 09:47:07.478 WARN - Exception: Element not found in the
cache - perhaps the page has changed since it was looked up
18:47:07 selenium_1   | For documentation on this error, please visit:
http://seleniumhq.org/exceptions/stale_element_reference.html
18:47:07 selenium_1   | Build info: version: '2.53.1', revision: 'a36b8b1',
time: '2016-06-30 17:37:03'
18:47:07 selenium_1   | System info: host: '78b9a07f51f2', ip: '192.168.16.2',
os.name: 'Linux', os.arch: 'amd64', os.version: '4.19.0-9-amd64', java.version:
'1.8.0_91'
18:47:07 selenium_1   | Driver info: driver.version: unknown
18:47:07 koha_1   | 
18:47:07 koha_1   | STRACE: /usr/share/perl5/Try/Tiny.pm:123 in
Selenium::Remote::Driver::catch {...} 
18:47:07 koha_1   |
/usr/local/share/perl/5.26.1/Selenium/Remote/Driver.pm:353 in Try::Tiny::try
18:47:07 koha_1   | (eval 1571):1 in
Selenium::Remote::Driver::__ANON__
18:47:07 koha_1   | (eval 1573):2 in
Selenium::Remote::Driver::__ANON__
18:47:07 koha_1   | (eval 1546):17 in
Selenium::Remote::Driver::_execute_command
18:47:07 koha_1   |
/usr/local/share/perl/5.26.1/Selenium/Remote/WebElement.pm:63 in
Selenium::Remote::WebElement::_execute_command
18:47:07 koha_1   | /kohadevbox/koha/t/lib/Selenium.pm:184 in
Selenium::Remote::WebElement::click
18:47:07 koha_1   | /kohadevbox/koha/t/lib/Selenium.pm:172 in
t::lib::Selenium::click_when_visible
18:47:07 koha_1   |
t/db_dependent/selenium/administration_tasks.t:131 in t::lib::Selenium::click

-- 
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 26143] The API does not handle requesting all resources

2020-08-05 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26143

--- Comment #7 from Jonathan Druart  
---
Pushed to master for 20.11, thanks to everybody involved!

-- 
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 26143] The API does not handle requesting all resources

2020-08-05 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26143

Jonathan Druart  changed:

   What|Removed |Added

 Version(s)||20.11.00
released in||
 Status|Passed QA   |Pushed to 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 26143] The API does not handle requesting all resources

2020-08-05 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26143

Jonathan Druart  changed:

   What|Removed |Added

 Status|Signed Off  |Passed 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 26143] The API does not handle requesting all resources

2020-08-05 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26143

--- Comment #5 from Jonathan Druart  
---
Created attachment 107840
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=107840=edit
Bug 26143: Regression tests

This patch introduces tests for the per_page=-1 handling use case. From
now on per_page=-1 means 'all resources'.

On writing this I noticed that we always paginate results no matter
what, but there was a weird condition under which on pagination headers
were sent back to the API consumer. This is highlighted in the precedent
patch, which is not the -1 situation this one tries to tackle.

Both pagination and searching are broken with per_page=-1, which is a
standard, and we actually didn't explicitly set a way to request all
resources.

To verify this:
1. Apply the previous tests patch and this one
2. Run:
   $ kshell
  k$ prove t/Koha/REST/Plugin/Pagination.t \
   t/db_dependent/Koha/REST/Plugin/Objects.t
=> FAIL: Things are damn broken

Signed-off-by: Tomas Cohen Arazi 

Signed-off-by: Jonathan Druart 

-- 
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 26143] The API does not handle requesting all resources

2020-08-05 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26143

Jonathan Druart  changed:

   What|Removed |Added

 Attachment #107836|0   |1
is obsolete||
 Attachment #107837|0   |1
is obsolete||
 Attachment #107838|0   |1
is obsolete||

--- Comment #4 from Jonathan Druart  
---
Created attachment 107839
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=107839=edit
Bug 26143: The API is always paginated

Signed-off-by: Tomas Cohen Arazi 

Signed-off-by: Jonathan Druart 

-- 
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 26143] The API does not handle requesting all resources

2020-08-05 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26143

--- Comment #6 from Jonathan Druart  
---
Created attachment 107841
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=107841=edit
Bug 26143: Make the API handle per_page=-1

This patch introduces handling for per_page=-1 and actually adds a
missing feature to the API: being able to request all resources on a
route.

To test this:
1. Visit the libraries admin page
2. On the table, choose to display 'All' rows
=> FAIL: it doesn't refresh, the browser console displays a 500 error
code and so the logs
3. Apply the tests patches
4. Run:
   $ kshell
  k$ prove t/Koha/REST/Plugin/Pagination.t \
   t/db_dependent/Koha/REST/Plugin/Objects.t
=> FAIL: Tests fail loudly
5. Apply this patch
6. Restart plack
7. Repeat 2
=> SUCCESS: choosing to display all, works
8. Repeat 4
=> SUCCESS: Tests pass now!
9. Sign off :-D

Signed-off-by: Tomas Cohen Arazi 

Signed-off-by: Jonathan Druart 

-- 
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 26143] The API does not handle requesting all resources

2020-08-05 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26143

Jonathan Druart  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 26143] The API does not handle requesting all resources

2020-08-05 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26143

Tomás Cohen Arazi  changed:

   What|Removed |Added

 CC||agustinmoy...@theke.io,
   ||k...@bywatersolutions.com,
   ||martin.renvoize@ptfs-europe
   ||.com,
   ||n...@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 26143] The API does not handle requesting all resources

2020-08-05 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26143

Tomás Cohen Arazi  changed:

   What|Removed |Added

 Status|ASSIGNED|Needs Signoff
Summary|Cannot see "all" libraries  |The API does not handle
   ||requesting all resources
Version|unspecified |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/