Bug 37334 will bring filtering to the holdings table status column. This bug is for the sorting of the status column.
Our staff are anxious to have this restored! They use the sort on bibs that have more than 20 items, some that have over 100.
*** This bug has been marked as a duplicate of bug 37334 ***
(In reply to Kristi from comment #1) > Our staff are anxious to have this restored! They use the sort on bibs that > have more than 20 items, some that have over 100. Can you detail your use case please?
We have several use cases: 1.Branch staff sort by status to see if they can identify an available copy and the branch itβs located at. 2. Our acquisitions team uses it to see how many viable (not missing, lost, withdrawn) copies are left on something that has high holds. Popular titles can have over 100 items. 3. Technical services uses it when looking at items that need to be called in to see if they are checked out, marked missing, etc. 4. We have wi-fi hotspots that are very popular and have several hundred items on the bib for each model. A lot of them are marked damaged, others are long overdue (Lost), some are Missing. These different statuses can make it confusing to know what should be circulating, so our staff use the status sort to eye up what is damaged, missing, etc.
Don't you think bug 37334 would help in most of those situations?
For use cases 1 and 2 especially, the sort rather than the filter would be the preferred method.
Our staff would love this feature back too. They find it easier to quickly scan the items over filtering. But ideally there is room for both :). Upvoting.
I prefer to be honest with you, there is very little chance to see the sort implemented in a near future. It was an limitation of bug 33568 that has been announced since day 1. I will do my best to provide alternative solutions that can potentially answer your needs however. (In reply to SamSowanick from comment #7) > They find it easier to quickly scan the items over filtering. Can you detail what you mean here please?
The sort function is a way to group the items allowing scanning over all the items at one time, allowing seeing proportions of items status on one bib. Filtering accomplishes this but requires you to know what status you are looking for; while also hiding other items not in the searched status. I also just realized that you can SHIFT + CLICK to sort two fields at the same time, so it is fully possible that I am missing an alternate something. I will see if I can get more context from our staff. Thank you for highlighting the context to the limitations for this bug.
Sorry - I'm not fluent in all the tech stuff, so it might be something obvious. But if all the other columns on the holdings table are sortable, why is status the only one that is not?
(In reply to Donna from comment #10) > Sorry - I'm not fluent in all the tech stuff, so it might be something > obvious. But if all the other columns on the holdings table are sortable, > why is status the only one that is not? Because it's calculated, not stored in DB like other attributes. If you want to sort by status you will need to calculate the status for all the items then display the 20 you want to display.
(In reply to Jonathan Druart from comment #8) > I prefer to be honest with you, there is very little chance to see the sort > implemented in a near future. It was an limitation of bug 33568 that has > been announced since day 1. Unfortunately this is not an option. Before Bug 33568 one could sort by statuses, this is a regression and many libraries cannot live without it.
I can work on this after we get Bug 37334 pushed.
(In reply to Lucas Gass (lukeg) from comment #13) > I can work on this after we get Bug 37334 pushed. What are you plans?
Please bring back the "sort by statuses" option.
Please restore ability to sort the holdings table by status. This is particularly an issue for our bibs with large holdings (up to 150 items) across multiple branches. Staff appreciated being able to sort by status to quickly eyeball the list and determine which branch has available items; we also have use cases similar to those listed by Kristi on 11/8/24, particularly with our hotspots and laptops.
(In reply to mreid from comment #16) > Please restore ability to sort the holdings table by status. This is > particularly an issue for our bibs with large holdings (up to 150 items) > across multiple branches. Staff appreciated being able to sort by status to > quickly eyeball the list and determine which branch has available items; we > also have use cases similar to those listed by Kristi on 11/8/24, > particularly with our hotspots and laptops. Have a look at Bug 37334. Filtering by available and then sorting by branch may solve your problem.
While filtering will be welcome, sorting is needed when staff are reviewing more than one status at a time. For example, to see how many copies on a bib are checked out or available to determine how many "live" copies there are as opposed to missing, damaged, etc. Our branch staff were accustomed to using the sort and continue to ask when this functionality will be restored.
*** Bug 39921 has been marked as a duplicate of this bug. ***
Created attachment 183789 [details] [review] Bug 38122: Add the ability to group holdings by status This is a quite ugly solution, but that may answer end-user needs. It add the option the group items by status on the bibliographic record detail page. However it will have VERY bad impact on performances for record with a lot of items, as we are going to determine the status of each items of the record.
Patch for discussion, it is not ready for inclusion.
Using k-t-d, I tested some performance using the "Group by status" button, I created items with various status's set: 80 items - 1348ms 200 items - 1463ms 500 items - 1995ms 1000 items - 2635ms
Hi, Is the provided patch supposed to be working or is is just an illustration of what we should do ? I had to tweak a lot to have it working, and I still cannot have it working well I think. I can provide my changes but there is one point I don't get, why do we order by Id at the end of the group search ? I cannot find the place where it is ordered by group after this. > order_by => [ \[ sprintf( "field(me.itemnumber, %s)", join( ', ', map { qq{'$_'} } @item_ids ) ) ] ]
(In reply to Baptiste Wojtkowski (bwoj) from comment #23) > Hi, > Is the provided patch supposed to be working or is is just an illustration > of what we should do ? I had to tweak a lot to have it working, and I still > cannot have it working well I think. It is supposed to work. Which problems did you face? > I can provide my changes but there is one point I don't get, why do we order > by Id at the end of the group search ? I cannot find the place where it is > ordered by group after this. > > > order_by => [ \[ sprintf( "field(me.itemnumber, %s)", join( ', ', map { qq{'$_'} } @item_ids ) ) ] ] We are ordering by itemnumbers, but using the array @item_ids that defines a specific order.
I could not have it sorting the items by status at all :) I faced three different issues : 1 - Since the function that creates the event is called by the event, I had an increasing number of calls to the API, without guarantee of the nature of the last one resolving 2 - Since group_by_status_values is reset at each resolution of the event $(".GroupByStatus").on("click"), I actually never sent the correct url to the API. 3 - WIth this fixed, the API was crashing, I had to change as follows - push @item_ids, $items_rs->search( { _status => $status } )->get_column('itemnumber'); + push @item_ids, $items_rs->search( { status => $status } )->get_column('itemnumber');
Oh wait, I might just have resolved a conflict improperly
Created attachment 184550 [details] [review] Bug 38122: Sort holdings table by status To test: 1. Apply the patch 2. Go to a record details page Example: http://localhost:8081/cgi-bin/koha/catalogue/detail.pl?biblionumber=285 3. Add several items to the record (with different statuses) 3. Click the Status column header in the holdings table to sort ---> items are correctly sorted by status (ascending and descending on repeated clicks)
(In reply to Hammat wele from comment #27) > Created attachment 184550 [details] [review] [review] > Bug 38122: Sort holdings table by status > > To test: > > 1. Apply the patch > 2. Go to a record details page Example: > http://localhost:8081/cgi-bin/koha/catalogue/detail.pl?biblionumber=285 > 3. Add several items to the record (with different statuses) > 3. Click the Status column header in the holdings table to sort > ---> items are correctly sorted by status (ascending and descending > on repeated clicks) Please explain because I don't understand what this patch is supposed to do.
(In reply to Hammat wele from comment #27) > Created attachment 184550 [details] [review] [review] > Bug 38122: Sort holdings table by status This patch does not work if you don't have all the items display. Example: I have 223 items, 4 are lost: Show first 20 items order by desc status: https://snipboard.io/9HWmp8.jpg (available first) Show first 20 items order by asc status: https://snipboard.io/vMmn9b.jpg (available first) Show all order by desc status (ok) https://snipboard.io/XZ8uqi.jpg
The initial patch is far from perfect and not ready for inclusion (at the minimum tests are missing). If you want to move this forward I would suggest to first help this first patch being pushed, then we can iterate on top of it.
Another problem with sorting by status like you did is that it's going to be translated and the ordering won't make any senses.