Bug 11205 - The datatables filters don't work when several tables exist
Summary: The datatables filters don't work when several tables exist
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: 3.14
Hardware: All All
: P5 - low normal (vote)
Assignee: Jonathan Druart
QA Contact: Marcel de Rooy
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-05 17:07 UTC by Jonathan Druart
Modified: 2014-05-26 21:04 UTC (History)
2 users (show)

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


Attachments
Bug 11205: The datatables filtering does not work when several tables exist (1.27 KB, patch)
2013-11-05 17:09 UTC, Jonathan Druart
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 11205: The datatables filtering does not work when several tables exist (1.35 KB, patch)
2013-11-06 06:44 UTC, Brendan Gallagher
Details | Diff | Splinter Review
Bug 11205: The datatables filtering does not work when several tables exist (1.44 KB, patch)
2013-11-07 08:02 UTC, Marcel de Rooy
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Druart 2013-11-05 17:07:39 UTC
If there are more than 1 table on the same page, the datatable filters don't work.
Comment 1 Jonathan Druart 2013-11-05 17:09:55 UTC Comment hidden (obsolete)
Comment 2 Brendan Gallagher 2013-11-06 06:44:34 UTC Comment hidden (obsolete)
Comment 3 Marcel de Rooy 2013-11-06 15:44:38 UTC
If I click on one of the titles in the table where expiration date is blank, the following error occurs:

Date::Calc::PP::Delta_Days(): Usage: Date::Calc::Delta_Days($year1,$month1,$day1,$year2,$month2,$day2) at /usr/share/koha/testclone/C4/Serials.pm line 2380

Could you confirm? If so, we should open a new report for that one..
Comment 4 Marcel de Rooy 2013-11-06 15:56:15 UTC
I have a hard time to reproduce the error :)
Somehow the filter on Open and Closed seems to work (also after refreshing) with and without this patch.
Could you please clarify what you exactly mean with "more than 1 table on the page"? Or provide some more detailed steps to reproduce the problem encountered?
Comment 5 Jonathan Druart 2013-11-06 15:59:53 UTC
Marcel, the only page with 2 tables is serials/serials-search.pl?searched=1
There are 2 tabs: opened and closed subscriptions.
On each tabs there is a table.
Comment 6 Jonathan Druart 2013-11-06 16:00:42 UTC
(In reply to M. de Rooy from comment #3)
> If I click on one of the titles in the table where expiration date is blank,
> the following error occurs:
> 
> Date::Calc::PP::Delta_Days(): Usage:
> Date::Calc::Delta_Days($year1,$month1,$day1,$year2,$month2,$day2) at
> /usr/share/koha/testclone/C4/Serials.pm line 2380
> 
> Could you confirm? If so, we should open a new report for that one..

I think it is not introduced by this patch.
Comment 7 Marcel de Rooy 2013-11-07 08:00:45 UTC
It would have been helpful to be somewhat more descriptive than just say "filters don't work". This could save some time in understanding what exactly the problem is. Your problem apparently was: If I filter on for instance a title word on the first tab (Opened), this filter should not be applied to the second tab (Closed).
Your patch does resolve this situation. Thanks for that.

No complaints from qa tools too.
Passed QA
Comment 8 Marcel de Rooy 2013-11-07 08:02:01 UTC
Created attachment 22758 [details] [review]
Bug 11205: The datatables filtering does not work when several tables exist

If there are more than 1 table on the same page, the datatable filters
don't work.

Test plan:
1/ Go on serials/serials-search.pl?searched=1
2/ filter on a column for opened subscriptions => the closed
subscriptions should not be filtered.

Works!

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 9 Jonathan Druart 2013-11-07 09:33:33 UTC
(In reply to M. de Rooy from comment #7)
> It would have been helpful to be somewhat more descriptive than just say
> "filters don't work". This could save some time in understanding what
> exactly the problem is. Your problem apparently was: If I filter on for
> instance a title word on the first tab (Opened), this filter should not be
> applied to the second tab (Closed).
> Your patch does resolve this situation. Thanks for that.

Sorry Marcel, I thought step 2 of the test plan explained that clearly.
Comment 10 Galen Charlton 2013-11-09 16:32:15 UTC
Pushed to master and 3.14.x.  Thanks, Jonathan!