Bug 22424 - Add search by all lost statuses to item search
Summary: Add search by all lost statuses to item search
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Searching (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-02-27 16:47 UTC by Owen Leonard
Modified: 2020-01-06 20:14 UTC (History)
2 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:
19.05.00
Circulation function:


Attachments
Bug 22424: Add search by all lost statuses to item search (10.92 KB, patch)
2019-04-25 13:50 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 22424: Add search by all lost statuses to item search (10.98 KB, patch)
2019-04-26 06:53 UTC, Claire Gravely
Details | Diff | Splinter Review
Bug 22424: (follow-up) Show blank value for empty status (6.10 KB, patch)
2019-04-29 15:44 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 22424: Add search by all lost statuses to item search (11.06 KB, patch)
2019-04-29 19:59 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 22424: (follow-up) Show blank value for empty status (6.18 KB, patch)
2019-04-29 19:59 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Owen Leonard 2019-02-27 16:47:31 UTC
Currently item search has "lost" as a yes or no field. Lost should be searchable just like "not for loan," listing all the authorized values configured.

Search results should include a column for "Lost."
Comment 1 Owen Leonard 2019-04-25 13:50:25 UTC
Created attachment 88782 [details] [review]
Bug 22424: Add search by all lost statuses to item search

This patch changes the item search form so that searching by lost status
includes options for all lost authorised values instead of just "yes" or
"no."

To test you should have multiple authorized values for LOST.

 - Apply the patch and open the item search form.
 - Test searches which limit by lost status. Confirm that results are
   correctly limited.
 - Confirm that lost statuses are correctly displayed in the search
   results.
 - Confirm that in the search results table, the column header for
   "Lost" includes a dropdown menu for filtering by all available
   authorized values for lost.
 - Test the CSV export function and confirm that lost status is
   correctly exported.
Comment 2 Claire Gravely 2019-04-26 06:53:15 UTC
Created attachment 88850 [details] [review]
Bug 22424: Add search by all lost statuses to item search

This patch changes the item search form so that searching by lost status
includes options for all lost authorised values instead of just "yes" or
"no."

To test you should have multiple authorized values for LOST.

 - Apply the patch and open the item search form.
 - Test searches which limit by lost status. Confirm that results are
   correctly limited.
 - Confirm that lost statuses are correctly displayed in the search
   results.
 - Confirm that in the search results table, the column header for
   "Lost" includes a dropdown menu for filtering by all available
   authorized values for lost.
 - Test the CSV export function and confirm that lost status is
   correctly exported.

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Comment 3 Katrin Fischer 2019-04-27 13:34:39 UTC
If the lost value is not set, the search results will display 0, same for the CSV export.

The entry 'Lost' is repeated in the datatables filter on top of the list. Maybe this needs to be renamed "Status" to be less confusing. Or "Not lost"?

Actually, in that context: I also think the "Status" column should be "not for loan" - but that belongs on a different bug maybe. :)
Comment 4 Owen Leonard 2019-04-29 15:44:41 UTC
Created attachment 89025 [details] [review]
Bug 22424: (follow-up) Show blank value for empty status

This patch updates the screen and CSV output of item searches so that if
the item does not have a lost status a blank table cell is shown instead
of "0."

This patch also amends the table headers so that "Not for loan" statuses
are explicitly labeled as such, and the "Lost" column has the header
"Lost status."

To test, apply the patch and perform an item search in the staff client
which will return results with notforloan and lost items. Verify that
the values display correctly in both onscreen and CSV output. Verify
that the column headers look correct.
Comment 5 Katrin Fischer 2019-04-29 19:59:18 UTC
Created attachment 89053 [details] [review]
Bug 22424: Add search by all lost statuses to item search

This patch changes the item search form so that searching by lost status
includes options for all lost authorised values instead of just "yes" or
"no."

To test you should have multiple authorized values for LOST.

 - Apply the patch and open the item search form.
 - Test searches which limit by lost status. Confirm that results are
   correctly limited.
 - Confirm that lost statuses are correctly displayed in the search
   results.
 - Confirm that in the search results table, the column header for
   "Lost" includes a dropdown menu for filtering by all available
   authorized values for lost.
 - Test the CSV export function and confirm that lost status is
   correctly exported.

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 6 Katrin Fischer 2019-04-29 19:59:21 UTC
Created attachment 89054 [details] [review]
Bug 22424: (follow-up) Show blank value for empty status

This patch updates the screen and CSV output of item searches so that if
the item does not have a lost status a blank table cell is shown instead
of "0."

This patch also amends the table headers so that "Not for loan" statuses
are explicitly labeled as such, and the "Lost" column has the header
"Lost status."

To test, apply the patch and perform an item search in the staff client
which will return results with notforloan and lost items. Verify that
the values display correctly in both onscreen and CSV output. Verify
that the column headers look correct.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 7 Katrin Fischer 2019-04-29 19:59:51 UTC
Thank you for the quick follow-up, Owen!
Comment 8 Nick Clemens (kidclamp) 2019-04-30 13:43:58 UTC
Awesome work all!

Pushed to master for 19.05
Comment 9 Martin Renvoize (ashimema) 2019-05-08 14:13:24 UTC
Enhancement will not be backported to 18.11.x series.