? ? Success

User tests: Successful: Unsuccessful:

avatar julienV
julienV
6 Jul 2017

Pull Request for Issue # .

Summary of Changes

Fixed a pagination issue with getStart computation, for custom limit/limit start.
$start value should only be adjusted if it's superior to $total, and not $total - $limit

In the case of a custom pagination (for example for a webservice api), it's possible that you won't be pulling pages using a constant $limit, so you might end up with something like:
$start = 140;
$limit = 15;
$total = 150;
In that case, the query should just return the items 140 to 150, but as 140 > 150 -15, it's recalculated to 135, so it will return items 135-150 instead

Testing Instructions

Expected result

Actual result

Documentation Changes Required

avatar julienV julienV - open - 6 Jul 2017
avatar julienV julienV - change - 6 Jul 2017
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 6 Jul 2017
Category Libraries
avatar joomla-cms-bot joomla-cms-bot - change - 24 Jul 2017
Category Libraries Libraries Unit Tests
avatar joomla-cms-bot joomla-cms-bot - edited - 5 Nov 2017
avatar franz-wohlkoenig franz-wohlkoenig - change - 5 Nov 2017
Title
[fix] fixed computation of start parameter when on last page
[fix] computation of start parameter when on last page
Status Pending Needs Review
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 5 Nov 2017

RTC after two successful tests.

avatar Quy
Quy - comment - 12 Jan 2018

@julienV Please fix conflict.

avatar julienV julienV - change - 15 Jan 2018
Labels Added: ?
avatar julienV
julienV - comment - 15 Jan 2018

@Quy i merged staging branch, no conflict

avatar franz-wohlkoenig franz-wohlkoenig - change - 19 Apr 2019
Title
[fix] computation of start parameter when on last page
computation of start parameter when on last page
avatar franz-wohlkoenig franz-wohlkoenig - edited - 19 Apr 2019
avatar laoneo laoneo - change - 19 Mar 2022
Status Needs Review Closed
Closed_Date 0000-00-00 00:00:00 2022-03-19 07:57:33
Closed_By laoneo
Labels Added: ? ?
Removed: J3 Issue ? ?
avatar laoneo
laoneo - comment - 19 Mar 2022

Sorry that it has taken so long to respond to this pull request. The code looks right but it needs some testing. Can you rebase your branch to the 4.2 branch and add some API system tests? You mentioned this change will very likely affect webservices so we need to make sure that it will not introduce a BC break here. In the meantime I will close it. When ready, please reopen this pull request again.

avatar laoneo laoneo - close - 19 Mar 2022
avatar laoneo laoneo - close - 19 Mar 2022

Add a Comment

Login with GitHub to post a comment