Bug 4037 - Inventory tool missing item type filter
Summary: Inventory tool missing item type filter
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Tools (show other bugs)
Version: Main
Hardware: PC All
: P5 - low enhancement
Assignee: Aleisha Amohia
QA Contact: Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-01-11 05:18 UTC by Nicole C. Engard
Modified: 2022-06-06 20:24 UTC (History)
9 users (show)

See Also:
Change sponsored?: Sponsored
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
This patch adds the ability to filter inventory by item type. Multiple item types can be selected at once.
Version(s) released in:
21.05.00
Circulation function:


Attachments
Bug 4037: Add item type filter to inventory tool (8.23 KB, patch)
2021-01-17 21:18 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 4037: Add item type filter to inventory tool (8.27 KB, patch)
2021-01-18 04:42 UTC, David Nind
Details | Diff | Splinter Review
Bug 4037: Add item type filter to inventory tool (8.40 KB, patch)
2021-02-05 15:47 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 4037: Add item type filter to inventory tool (8.40 KB, patch)
2021-02-05 15:50 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 4037: Correctly join the itemtypes array (2.86 KB, patch)
2021-02-08 15:07 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 4037: Correctly join the itemtypes array (1.83 KB, patch)
2021-02-08 15:08 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 4037: Remove hardcoded 4 columns (1.27 KB, patch)
2021-02-08 15:11 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 4037: Add item type filter to inventory tool (8.40 KB, patch)
2021-02-08 20:44 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 4037: Correctly join the itemtypes array (1.88 KB, patch)
2021-02-08 20:45 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 Chris Cormack 2010-05-21 01:22:24 UTC


---- Reported by nengard@gmail.com 2010-01-11 17:18:20 ----

Often things are organized in the library based on item type so if you want to do inventory in one area of the library you want to limit by item type - also it was something that was there before, so it seems silly to remove it at this point.



--- Bug imported by chris@bigballofwax.co.nz 2010-05-21 01:22 UTC  ---

This bug was previously known as _bug_ 4037 at http://bugs.koha.org/cgi-bin/bugzilla3/show_bug.cgi?id=4037

Actual time not defined. Setting to 0.0
CC member jwagner@ptfs.com does not have an account here

Comment 1 Paul Poulain 2011-08-02 14:46:41 UTC
still relevant
Comment 2 Mathieu Saby 2013-09-14 12:46:43 UTC
still relevant in master and 3.12

M. Saby
Comment 3 Paul Poulain 2016-06-04 09:02:08 UTC
Issue still exist in 16.05
Comment 4 Katrin Fischer 2019-10-23 07:13:44 UTC
Still valid.
Comment 5 Aleisha Amohia 2021-01-17 21:18:45 UTC
Created attachment 115230 [details] [review]
Bug 4037: Add item type filter to inventory tool

This patch adds the ability to filter inventory by item type. Multiple
item types can be selected at once.

To test:
1) Apply patch and restart services.
2) Set up (at least) one item of a specific item type.
3) Go to Tools -> Inventory.
4) Scroll down to find the item types filter. Confirm the 'select all'
and 'clear all' buttons work as expected.
5) Select a few item types, but DO NOT include the item type that you
just set for your item. Confirm that your item does not show in the
results.
6) Go back to the Inventory tool. This time submit a search that DOES
include the item type you just set for your item. Confirm that your item
does show in the results.
7) Confirm tests pass:
prove t/db_dependent/Items/GetItemsForInventory.t

Sponsored-by: Bibliotheksservice-Zentrum Baden-Württemberg (BSZ)
Comment 6 David Nind 2021-01-18 04:42:32 UTC
Created attachment 115231 [details] [review]
Bug 4037: Add item type filter to inventory tool

This patch adds the ability to filter inventory by item type. Multiple
item types can be selected at once.

To test:
1) Apply patch and restart services.
2) Set up (at least) one item of a specific item type.
3) Go to Tools -> Inventory.
4) Scroll down to find the item types filter. Confirm the 'select all'
and 'clear all' buttons work as expected.
5) Select a few item types, but DO NOT include the item type that you
just set for your item. Confirm that your item does not show in the
results.
6) Go back to the Inventory tool. This time submit a search that DOES
include the item type you just set for your item. Confirm that your item
does show in the results.
7) Confirm tests pass:
prove t/db_dependent/Items/GetItemsForInventory.t

Sponsored-by: Bibliotheksservice-Zentrum Baden-Württemberg (BSZ)

Signed-off-by: David Nind <david@davidnind.com>
Comment 7 Katrin Fischer 2021-02-05 15:47:00 UTC
Created attachment 116414 [details] [review]
Bug 4037: Add item type filter to inventory tool

This patch adds the ability to filter inventory by item type. Multiple
item types can be selected at once.

To test:
1) Apply patch and restart services.
2) Set up (at least) one item of a specific item type.
3) Go to Tools -> Inventory.
4) Scroll down to find the item types filter. Confirm the 'select all'
and 'clear all' buttons work as expected.
5) Select a few item types, but DO NOT include the item type that you
just set for your item. Confirm that your item does not show in the
results.
6) Go back to the Inventory tool. This time submit a search that DOES
include the item type you just set for your item. Confirm that your item
does show in the results.
7) Confirm tests pass:
prove t/db_dependent/Items/GetItemsForInventory.t

Sponsored-by: Bibliotheksservice-Zentrum Baden-Württemberg (BSZ)

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Christian Stelzenmüller
<christian.stelzenmueller@bsz-bw.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Comment 8 Katrin Fischer 2021-02-05 15:50:16 UTC
Created attachment 116415 [details] [review]
Bug 4037: Add item type filter to inventory tool

This patch adds the ability to filter inventory by item type. Multiple
item types can be selected at once.

To test:
1) Apply patch and restart services.
2) Set up (at least) one item of a specific item type.
3) Go to Tools -> Inventory.
4) Scroll down to find the item types filter. Confirm the 'select all'
and 'clear all' buttons work as expected.
5) Select a few item types, but DO NOT include the item type that you
just set for your item. Confirm that your item does not show in the
results.
6) Go back to the Inventory tool. This time submit a search that DOES
include the item type you just set for your item. Confirm that your item
does show in the results.
7) Confirm tests pass:
prove t/db_dependent/Items/GetItemsForInventory.t

Sponsored-by: Bibliotheksservice-Zentrum Baden-Württemberg (BSZ)

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Christian Stelzenmüller <christian.stelzenmueller@bsz-bw.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Comment 9 Jonathan Druart 2021-02-08 15:07:20 UTC
Created attachment 116512 [details] [review]
Bug 4037: Correctly join the itemtypes array
Comment 10 Jonathan Druart 2021-02-08 15:08:54 UTC
Created attachment 116513 [details] [review]
Bug 4037: Correctly join the itemtypes array
Comment 11 Jonathan Druart 2021-02-08 15:11:02 UTC
Created attachment 116514 [details] [review]
Bug 4037: Remove hardcoded 4 columns
Comment 12 Jonathan Druart 2021-02-08 15:12:11 UTC
Katrin, can you review those 2 last patches?

I am quite confident with the first one.

The second one remove the weirdness in the template to try and display correctly the item types. Don't we have other places we item types are displayed? On the adv search there are the icons, should we have them here as well?
Comment 13 Katrin Fischer 2021-02-08 15:16:58 UTC
(In reply to Jonathan Druart from comment #12)
> Katrin, can you review those 2 last patches?
> 
> I am quite confident with the first one.
> 
> The second one remove the weirdness in the template to try and display
> correctly the item types. Don't we have other places we item types are
> displayed? On the adv search there are the icons, should we have them here
> as well?

I think having the icons here would be too much "clutter", having the descriptions is enough I think.
We do a grid display of libraries and something for itemtypes in columns on the advanced search page. We'll try to retest.

I am not sure removing the lines in the second patch is right from glancing at it, but will look at a full template to see how things fit together.
Comment 14 Katrin Fischer 2021-02-08 15:19:51 UTC
> I think having the icons here would be too much "clutter", having the
> descriptions is enough I think.
> We do a grid display of libraries and something for itemtypes in columns on
> the advanced search page. We'll try to retest.


We do a grid display of libraries ... on the export tool. Gr.
Comment 15 Jonathan Druart 2021-02-08 15:27:51 UTC
Indeed, obsoleting it.
Comment 16 Katrin Fischer 2021-02-08 20:44:59 UTC
Created attachment 116522 [details] [review]
Bug 4037: Add item type filter to inventory tool

This patch adds the ability to filter inventory by item type. Multiple
item types can be selected at once.

To test:
1) Apply patch and restart services.
2) Set up (at least) one item of a specific item type.
3) Go to Tools -> Inventory.
4) Scroll down to find the item types filter. Confirm the 'select all'
and 'clear all' buttons work as expected.
5) Select a few item types, but DO NOT include the item type that you
just set for your item. Confirm that your item does not show in the
results.
6) Go back to the Inventory tool. This time submit a search that DOES
include the item type you just set for your item. Confirm that your item
does show in the results.
7) Confirm tests pass:
prove t/db_dependent/Items/GetItemsForInventory.t

Sponsored-by: Bibliotheksservice-Zentrum Baden-Württemberg (BSZ)

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Christian Stelzenmüller <christian.stelzenmueller@bsz-bw.de>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Comment 17 Katrin Fischer 2021-02-08 20:45:03 UTC
Created attachment 116523 [details] [review]
Bug 4037: Correctly join the itemtypes array

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 18 Katrin Fischer 2021-02-08 20:46:53 UTC
It works well for me with the follow-up.
Comment 19 Jonathan Druart 2021-02-09 08:50:02 UTC
Pushed to master for 21.05, thanks to everybody involved!
Comment 20 Fridolin Somers 2021-02-12 14:42:22 UTC
In my opinion, SQL query should depend on preference 'item-level_itypes',
like for example in GetTopIssues :
https://git.koha-community.org/Koha-community/Koha/src/commit/40ccb7f37138e0bf31345608459eb7a9ba666027/C4/Circulation.pm#L4197

I know its wrong, but sometimes we see datas other than itemtypes in biblioitems.itemtype (when itemtype on item level)