Bug 28653 - Sorting loans by due date doesn't work after renewing
Summary: Sorting loans by due date doesn't work after renewing
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: master
Hardware: All All
: P5 - low trivial (vote)
Assignee: Emmi Takkinen
QA Contact: Joonas Kylmälä
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-07-02 07:49 UTC by Emmi Takkinen
Modified: 2021-10-16 02:23 UTC (History)
8 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Text to go in the release notes:
Version(s) released in:
21.11.00,21.05.05,20.11.11


Attachments
Bug 28653: Add new method RefreshIssuesTable (2.70 KB, patch)
2021-07-02 12:07 UTC, Emmi Takkinen
Details | Diff | Splinter Review
Bug 28653: Add new method RefreshIssuesTable (2.75 KB, patch)
2021-08-10 16:15 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 28653: Add new method RefreshIssuesTable (2.89 KB, patch)
2021-09-12 14:13 UTC, Joonas Kylmälä
Details | Diff | Splinter Review
Bug 28653: (QA follow-up) Remove debug message used during development (1.18 KB, patch)
2021-09-12 14:13 UTC, Joonas Kylmälä
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Emmi Takkinen 2021-07-02 07:49:31 UTC
On patrons check out or details page, after renewing loans they don't sort correctly when clicking on "Date due" tab. Page has to be reloaded so that sorting works.  

To test:
1. Add 3 loans for patron.
2. Change date dues so you they are e.g. 07/01, 07/02, 07/04
3. Make sure you have renewal period set e.g. 5 days and check your  RenewalPeriodBase syspref (I use current date there)
4. Renew loan with date due on 07/01, it should now be 07/07
3. Sort loans by date due
=> Note that order from top to bottom is 07/04->07/02->07/07 or 07/07->07/02->07/04, not 07/02->07/04->07/07 as one would assumme.
Comment 1 Emmi Takkinen 2021-07-02 12:07:46 UTC
Created attachment 122543 [details] [review]
Bug 28653: Add new method RefreshIssuesTable

On patrons check out or details page, after renewing
loans they don't sort correctly when clicking on "Date due"
tab. Page has to be reloaded so that sorting works.
This patch adds new method RefreshIssuesTable to
checkouts.js. When loans are renewed or checked in, issues
table is reloaded to and due dates are sorted correctly.

To test:
1. Add 3 loans for patron.
2. Change due dates so you they are e.g. 07/01, 07/02, 07/04
3. Make sure you have renewal period set e.g. 5 days and
check your RenewalPeriodBase syspref (I use current date there)
4. Renew loan with date due on 07/01, it should now be 07/07
5. Sort loans by date due
=> Note that order from top to bottom is 07/04->07/02->07/07
or 07/07->07/02->07/04, not 07/02->07/04->07/07 as one would
assume.
6. Apply patch and repeat.
=> Note that issues table is reloaded ("Loading..." pop-up is displayed)
and that due dates are in correct order.

Sponsored-by: Koha-Suomi Oy
Comment 2 Kyle M Hall 2021-08-10 16:15:23 UTC
Created attachment 123706 [details] [review]
Bug 28653: Add new method RefreshIssuesTable

On patrons check out or details page, after renewing
loans they don't sort correctly when clicking on "Date due"
tab. Page has to be reloaded so that sorting works.
This patch adds new method RefreshIssuesTable to
checkouts.js. When loans are renewed or checked in, issues
table is reloaded to and due dates are sorted correctly.

To test:
1. Add 3 loans for patron.
2. Change due dates so you they are e.g. 07/01, 07/02, 07/04
3. Make sure you have renewal period set e.g. 5 days and
check your RenewalPeriodBase syspref (I use current date there)
4. Renew loan with date due on 07/01, it should now be 07/07
5. Sort loans by date due
=> Note that order from top to bottom is 07/04->07/02->07/07
or 07/07->07/02->07/04, not 07/02->07/04->07/07 as one would
assume.
6. Apply patch and repeat.
=> Note that issues table is reloaded ("Loading..." pop-up is displayed)
and that due dates are in correct order.

Sponsored-by: Koha-Suomi Oy

Signed-off-by: kelly <kelly@bywatersolutions.com>
Comment 3 Joonas Kylmälä 2021-09-12 14:13:29 UTC
Created attachment 124815 [details] [review]
Bug 28653: Add new method RefreshIssuesTable

On patrons check out or details page, after renewing
loans they don't sort correctly when clicking on "Date due"
tab. Page has to be reloaded so that sorting works.
This patch adds new method RefreshIssuesTable to
checkouts.js. When loans are renewed or checked in, issues
table is reloaded to and due dates are sorted correctly.

To test:
1. Add 3 loans for patron.
2. Change due dates so you they are e.g. 07/01, 07/02, 07/04
3. Make sure you have renewal period set e.g. 5 days and
check your RenewalPeriodBase syspref (I use current date there)
4. Renew loan with date due on 07/01, it should now be 07/07
5. Sort loans by date due
=> Note that order from top to bottom is 07/04->07/02->07/07
or 07/07->07/02->07/04, not 07/02->07/04->07/07 as one would
assume.
6. Apply patch and repeat.
=> Note that issues table is reloaded ("Loading..." pop-up is displayed)
and that due dates are in correct order.

Sponsored-by: Koha-Suomi Oy

Signed-off-by: kelly <kelly@bywatersolutions.com>

Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Comment 4 Joonas Kylmälä 2021-09-12 14:13:33 UTC
Created attachment 124816 [details] [review]
Bug 28653: (QA follow-up) Remove debug message used during development

Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Comment 5 Jonathan Druart 2021-09-20 11:59:20 UTC
Patches will be squashed when pushed.
Comment 6 Jonathan Druart 2021-09-20 12:47:37 UTC
Pushed to master for 21.11, thanks to everybody involved!
Comment 7 Kyle M Hall 2021-10-01 18:24:14 UTC
Pushed to 21.05.x for 21.05.05
Comment 8 Fridolin Somers 2021-10-09 02:14:02 UTC
Pushed to 20.11.x for 20.11.11
Comment 9 Victor Grousset/tuxayo 2021-10-16 02:23:32 UTC
Not backported to oldoldstable (20.05.x). Feel free to ask if it's needed.