Bug 11129 - Filtering Items based on type in opac-detail.pl
Summary: Filtering Items based on type in opac-detail.pl
Status: Failed QA
Alias: None
Product: Koha
Classification: Unclassified
Component: Serials (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Olli-Antti Kivilahti
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks: 6385
  Show dependency treegraph
 
Reported: 2013-10-24 11:03 UTC by Olli-Antti Kivilahti
Modified: 2016-04-22 01:51 UTC (History)
3 users (show)

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


Attachments
Bug 11129 - Filtering Items based on type in opac-detail.pl (35.89 KB, patch)
2013-10-28 11:32 UTC, Olli-Antti Kivilahti
Details | Diff | Splinter Review
Bug 11129 - Filtering Items based on type in opac-detail.pl (35.89 KB, patch)
2013-10-29 10:21 UTC, Olli-Antti Kivilahti
Details | Diff | Splinter Review
Manual test plan (2.60 KB, text/plain)
2013-10-30 08:52 UTC, Olli-Antti Kivilahti
Details
Bug 11129 - Filtering Items based on type in opac-detail.pl (34.92 KB, patch)
2013-10-30 09:33 UTC, Olli-Antti Kivilahti
Details | Diff | Splinter Review
Bug 11129 - Filtering Items based on type in opac-detail.pl (46.73 KB, patch)
2013-11-26 17:13 UTC, Olli-Antti Kivilahti
Details | Diff | Splinter Review
Bug 11129 - Filtering Items based on type in opac-detail.pl (34.63 KB, patch)
2013-11-28 10:53 UTC, Olli-Antti Kivilahti
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Olli-Antti Kivilahti 2013-10-24 11:03:51 UTC
One can easily have thousands of Serial issue items in the database.
Currently they are shown in the OPAC and Staff Client in one huge table.
Finding and placing a hold on the desired issue number is hard.
Also there are performance considerations when showing huge amounts of issues unnecessarily.

By filtering the display of issues before they are loaded on screen, we can fulfill those requirements.
Changing the default view from huge blob to the most recent items saves DB effort.
All these modifications apply only to biblios which have subscriptions and more than AllSerialIssuesDisplayThreshold -system preference items.
Comment 1 Olli-Antti Kivilahti 2013-10-24 11:09:40 UTC
Results are filtered by:
branch, volume, number/issue, fromDate, toDate.

Tricky part is ambiguation in volume, number/issue.
This is pulled from the items.enumchron and can have various different ways of spelling.
Will add a system preference to define the organisation-wide way of labeling Serial issues.
Filtering cannot be done if the enumerations are not reasonably consistent.
Comment 2 Olli-Antti Kivilahti 2013-10-28 11:32:43 UTC Comment hidden (obsolete)
Comment 3 Olli-Antti Kivilahti 2013-10-29 10:21:18 UTC Comment hidden (obsolete)
Comment 4 Olli-Antti Kivilahti 2013-10-30 08:52:21 UTC
Created attachment 22566 [details]
Manual test plan

Attached a manual test plan.
Comment 5 Olli-Antti Kivilahti 2013-10-30 09:33:33 UTC Comment hidden (obsolete)
Comment 6 Olli-Antti Kivilahti 2013-10-30 09:39:51 UTC
Sponsored by the Joensuu Regional Library
Comment 7 Olli-Antti Kivilahti 2013-11-26 17:13:15 UTC Comment hidden (obsolete)
Comment 8 Olli-Antti Kivilahti 2013-11-28 10:53:38 UTC
Created attachment 23205 [details] [review]
Bug 11129 - Filtering Items based on type in opac-detail.pl

Currently all Items are always shown on the opac-detail.pl. This is difficult when the amount of Items grows substantially large.
Implemented a filter to limit the Items shown (and SELECTed from the DB) based on some typical filters,
  locationbranch, volume, number, issue, fromDate, toDate.
Also streamlined how Serials-data is pulled from the DB to prevent substantial extra work in C4::Items::GetItemsInfo().
C4::Items::GetItemsInfo() extended to support various filters.

All modifications:
Item filter shown when there are over 50 items (lotsofitems-flag).
Filter fields can be changed based on the Biblio type (isSerial-flag).
-Volume + Issue + Number available only for serials.
Can syspref if Issue-field is used in serial records.
Can syspref a regexp to parse the Volume + Number + Issue from the enumeration or chronology field.
FromDate and ToDate filter the serial.publisheddate when dealing with serials otherwise target the items.timestamp -column.
C4::Items::GetItemsInfo() simplified to include the serial data in the BIG SQL. This makes filtering by publisheddate much more faster.

User input validated using HTML5 <input "number">
Business layer validations as well.

Unit tests:
Serials enumeration and chronology filtering
Items date and branch filtering

Sponsored by the Joensuu Regional Library
Comment 9 Mark Tompsett 2016-04-22 01:51:10 UTC
Not only doesn't this apply, this approach is completely wrong now.
Please look into Koha/RecordProcessor.pm and see bug 11592 as an example of how to move forward with this.