Bug 11274 - Sent Notices Tab Not Working Correctly
Summary: Sent Notices Tab Not Working Correctly
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Notices (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks: 36810 18439
  Show dependency treegraph
 
Reported: 2013-11-19 23:33 UTC by Jesse Maseto
Modified: 2024-05-08 10:30 UTC (History)
7 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Bug 11274: Sent Notices Tab Not Working Correctl (1.63 KB, patch)
2016-11-06 08:53 UTC, Josef Moravec
Details | Diff | Splinter Review
Bug 11274: Sent Notices Tab Not Working Correctly (1.60 KB, patch)
2016-11-21 11:33 UTC, Josef Moravec
Details | Diff | Splinter Review
Bug 11274 [Alternate] Sent Notices Tab Not Working Correctly (2.45 KB, patch)
2016-11-21 13:29 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 11274 Sent Notices Tab Not Working Correctly (2.46 KB, patch)
2016-12-01 07:04 UTC, Josef Moravec
Details | Diff | Splinter Review
Bug 11274 Sent Notices Tab Not Working Correctly (2.52 KB, patch)
2016-12-12 12:12 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Maseto 2013-11-19 23:33:41 UTC
Koha is only allowing staff to view the first 20 notices from the checkout screen. When you click the link of any other notice past the 20th one - it does not open, it just pops you back to the top of the page.

To re-create
Look up patron "with notices"
Click on the notices tab
Change "Show" to "50"
Try clicking on one of the notices at the bottom of the list.
Comment 1 Nicole C. Engard 2014-01-24 13:45:40 UTC
Somehow this was marked enhancement instead of bug.
Comment 2 Christopher Brannon 2014-09-19 21:23:32 UTC
I would like to suggest that this is a critical bug.  We can't access portions of patron information.
Comment 3 Christopher Brannon 2014-09-19 21:25:34 UTC
(In reply to Jesse Maseto from comment #0)
> Koha is only allowing staff to view the first 20 notices from the checkout
> screen. When you click the link of any other notice past the 20th one - it
> does not open, it just pops you back to the top of the page.
> 
> To re-create
> Look up patron "with notices"
> Click on the notices tab
> Change "Show" to "50"
> Try clicking on one of the notices at the bottom of the list.

This does not require changing the number of shown notices.  You can click on the next page of notices and get the same results.
Comment 4 Katrin Fischer 2014-09-21 13:13:42 UTC
Is this really 3.12? Or also on master?
Comment 5 Jonathan Druart 2015-04-23 15:57:54 UTC
Does not appears on master.
Comment 6 Christopher Brannon 2015-04-29 17:59:44 UTC
Actually, on 3.18, which we just upgraded to, we are seeing the opposite now.  The first page of notices works as expected, but when you go to the next page, everything is expanded, and cannot be collapsed!  If you change view to more than 20 at a time, the first 20 are normal and the rest are expanded.  Very weird!

Christopher
Comment 7 Jonathan Druart 2015-04-30 07:36:40 UTC
(In reply to Christopher Brannon from comment #6)
> Actually, on 3.18, which we just upgraded to, we are seeing the opposite
> now.  The first page of notices works as expected, but when you go to the
> next page, everything is expanded, and cannot be collapsed!  If you change
> view to more than 20 at a time, the first 20 are normal and the rest are
> expanded.  Very weird!
> 
> Christopher

Confirmed on 3.18.x and master.
Comment 8 Josef Moravec 2016-11-06 08:53:00 UTC
Created attachment 57226 [details] [review]
Bug 11274: Sent Notices Tab Not Working Correctl

Test plan
1) have a patron with more then 20 notices sent
2) go to patron profile -> notices
-> without patch, the showing/hidding of notices content does work
correctly only on first loaded page
-> with patch, it should work correctly everywhere - try to use
paginator, searching, ordering....
Comment 9 Josef Moravec 2016-11-06 08:54:31 UTC
Just a quick try, feel free to comment on this approach...
Comment 10 Owen Leonard 2016-11-09 15:08:22 UTC
Only one problem I see with this: If I show all notices (that is, enough notices to have to scroll down to reach the bottom of the list) I see that clicking to expand a notice jumps me to the top of the screen.
Comment 11 Josef Moravec 2016-11-21 11:33:58 UTC
Created attachment 57673 [details] [review]
Bug 11274: Sent Notices Tab Not Working Correctly

Test plan
1) have a patron with more then 20 notices sent
2) go to patron profile -> notices
-> without patch, the showing/hidding of notices content does work
correctly only on first loaded page
-> with patch, it should work correctly everywhere - try to use
paginator, searching, ordering....
Comment 12 Josef Moravec 2016-11-21 11:34:54 UTC
(In reply to Owen Leonard from comment #10)
> Only one problem I see with this: If I show all notices (that is, enough
> notices to have to scroll down to reach the bottom of the list) I see that
> clicking to expand a notice jumps me to the top of the screen.

Thanks for testing, should be fine now
Comment 13 Owen Leonard 2016-11-21 13:07:42 UTC
Sorry but I'm still having trouble with this: Expanding the notice works fine after changing pages or searching, but not after sorting. However, it seems very random. Some notices will appear and some won't.
Comment 14 Owen Leonard 2016-11-21 13:29:07 UTC
Created attachment 57679 [details] [review]
Bug 11274 [Alternate] Sent Notices Tab Not Working Correctly

This patch implements the notices toggle event using a different method.
Using on() lets us bind the event to a parent element, allowing the
event to attach to elements which may not exist on the page yet.

Test plan the same as original patch:

1) have a patron with more then 20 notices sent
2) go to patron profile -> notices
-> without patch, the showing/hidding of notices content does work
correctly only on first loaded page
-> with patch, it should work correctly everywhere - try to use
paginator, searching, ordering....
Comment 15 Mika 2016-12-01 01:37:16 UTC
Before patch was applied, notices on first page were fine but records on next page were indeed expanded but could be collapsed. The patch did not fix this, however when I applied the patch, all the notices appeared on one page expanded and there was no option to collapse them and no option to see them on multiple pages/go to next page.
Comment 16 Josef Moravec 2016-12-01 07:04:07 UTC
Created attachment 57854 [details] [review]
Bug 11274 Sent Notices Tab Not Working Correctly

This patch implements the notices toggle event using a different method.
Using on() lets us bind the event to a parent element, allowing the
event to attach to elements which may not exist on the page yet.

Test plan the same as original patch:

1) have a patron with more then 20 notices sent
2) go to patron profile -> notices
-> without patch, the showing/hidding of notices content does work
correctly only on first loaded page
-> with patch, it should work correctly everywhere - try to use
paginator, searching, ordering....

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 17 Josef Moravec 2016-12-01 07:07:17 UTC
Sorry to not been able to test it sooner, I use the Owen's patch and it worked perfect for me, so I obsoleted mine and signed off the Owen's ;)

(In reply to Mika from comment #15)
> Before patch was applied, notices on first page were fine but records on
> next page were indeed expanded but could be collapsed. The patch did not fix
> this, however when I applied the patch, all the notices appeared on one page
> expanded and there was no option to collapse them and no option to see them
> on multiple pages/go to next page.

There were two alternative patches, maybe if you accidentaly apply both, this could happen I imagine...
Comment 18 Jonathan Druart 2016-12-12 12:12:48 UTC
Created attachment 58114 [details] [review]
Bug 11274 Sent Notices Tab Not Working Correctly

This patch implements the notices toggle event using a different method.
Using on() lets us bind the event to a parent element, allowing the
event to attach to elements which may not exist on the page yet.

Test plan the same as original patch:

1) have a patron with more then 20 notices sent
2) go to patron profile -> notices
-> without patch, the showing/hidding of notices content does work
correctly only on first loaded page
-> with patch, it should work correctly everywhere - try to use
paginator, searching, ordering....

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Comment 19 Kyle M Hall (khall) 2016-12-16 11:11:23 UTC
Pushed to master for 17.05, thanks Owen!
Comment 20 Katrin Fischer 2016-12-18 20:29:22 UTC
This patch has been pushed to 16.11.x, will be in 16.11.01.
Comment 21 Julian Maurice 2017-01-02 11:09:50 UTC
Pushed to 3.22.x for 3.22.14
Comment 22 Mason James 2017-01-29 11:39:30 UTC
Pushed to 16.05.x, for 16.05.06 release