[Bug 28074] New: Browse controls in staff details are sometimes weird
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28074 Bug ID: 28074 Summary: Browse controls in staff details are sometimes weird Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Searching Assignee: koha-bugs@lists.koha-community.org Reporter: lucas@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org The browse control feature doesn't work quite right in the OPAC detail. 1. If you do a search with 3-4 results, go to the record and use the browse controls, when you get to the last record if you attempt to go to the 'next' you'll end up on a page which says 'record not found'. 2. Do a search with exactly 10 results. Click on the first record, the 'next' arrow is not a link, you cannot move to the next result. This is because in js/browser.js, if you look at the current_search Object and specifically at current_search.offset you will see that current_search.offset is a string. We try to do calculations with that variable and JavaScript performs string concatenation instead of addtion. For example: current_search.offset + me.curPos == current_search.total When the offset is '1' and we add it to 0, the result is 10. Therefore if the offset is the first and the total is 10, it thinks we are on the last result (10) and doesn't let use move forward. Converting current_search.offset to an integer solves the problem. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28074 --- Comment #1 from Lucas Gass <lucas@bywatersolutions.com> --- When I said OPAC detail, I meant staff detail -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28074 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28074 --- Comment #2 from Lucas Gass <lucas@bywatersolutions.com> --- Created attachment 119090 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=119090&action=edit Bug 28074: Make current_search.offset an integer instead of string To test: 1. do a search with 3-4 results, go to the record and use the browse controls, when you get to the last record if you attempt to go to the 'next' you'll end up on a page which says 'record not found'.2. Do a search with exactly 10 results. Click on the first record, the 'next' arrow is not a link, you cannot move to the next result 3. Apply patch 4. repeat steps 1-2 and the problems should be gone -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28074 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28074 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #119090|0 |1 is obsolete| | --- Comment #3 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 119122 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=119122&action=edit Bug 28074: Make current_search.offset an integer instead of string To test: 1. Do a search with 3-4 results, go to the record and use the browse controls, when you get to the last record if you attempt to go to the 'next' you'll end up on a page which says 'record not found.' 2. Do a search with exactly 10 results. Click on the first record, the 'next' arrow is not a link, you cannot move to the next result. 3. Apply patch 4. Repeat steps 1-2 and the problems should be gone. Signed-off-by: Owen Leonard <oleonard@myacpl.org> -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28074 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |lucas@bywatersolutions.com |ity.org | -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28074 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Browse controls in staff |Browse controls on staff |details are sometimes weird |detail pages are sometimes | |weird -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28074 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28074 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #119122|0 |1 is obsolete| | --- Comment #4 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 119154 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=119154&action=edit Bug 28074: Make current_search.offset an integer instead of string To test: 1. Do a search with 3-4 results, go to the record and use the browse controls, when you get to the last record if you attempt to go to the 'next' you'll end up on a page which says 'record not found.' 2. Do a search with exactly 10 results. Click on the first record, the 'next' arrow is not a link, you cannot move to the next result. 3. Apply patch 4. Repeat steps 1-2 and the problems should be gone. Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28074 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |21.05.00 released in| | Status|Passed QA |Pushed to master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28074 --- Comment #5 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Pushed to master for 21.05, thanks to everybody involved! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28074 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|21.05.00 |21.05.00,20.11.05 released in| | CC| |fridolin.somers@biblibre.co | |m Status|Pushed to master |Pushed to stable --- Comment #6 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to 20.11.x for 20.11.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28074 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|21.05.00,20.11.05 |21.05.00,20.11.05,20.05.11 released in| | CC| |andrew@bywatersolutions.com Status|Pushed to stable |Pushed to oldstable --- Comment #7 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Pushed to 20.05.x for 20.05.11 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28074 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |victor@tuxayo.net Status|Pushed to oldstable |RESOLVED Resolution|--- |FIXED --- Comment #8 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Not backported to oldoldstable (19.11.x). Feel free to ask if it's needed. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org