Bug 38118 - Removed empty columns on holdings table on details page are not restored when new items loaded
Summary: Removed empty columns on holdings table on details page are not restored when...
Status: Needs documenting
Alias: None
Product: Koha
Classification: Unclassified
Component: Staff interface (show other bugs)
Version: Main
Hardware: All All
: P5 - low major
Assignee: Jonathan Druart
QA Contact: Nick Clemens (kidclamp)
URL:
Keywords:
Depends on: 33568
Blocks: 38240 38485
  Show dependency treegraph
 
Reported: 2024-10-08 12:28 UTC by Nick Clemens (kidclamp)
Modified: 2024-12-13 13:45 UTC (History)
7 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
24.11.00,24.05.06
Circulation function:


Attachments
Bug 38118: Display columns if not empty in drawCallback (3.17 KB, patch)
2024-10-08 13:43 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 38118: Display columns if not empty in drawCallback (3.23 KB, patch)
2024-10-08 16:51 UTC, Victor Grousset/tuxayo
Details | Diff | Splinter Review
Bug 38118: Display columns if not empty in drawCallback (3.29 KB, patch)
2024-10-10 11:17 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
[24.05] Bug 38118: Display columns if not empty in drawCallback (3.26 KB, patch)
2024-11-19 09:09 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Clemens (kidclamp) 2024-10-08 12:28:41 UTC
The holdings table removes empty columns when loading the first page via API, however, it does not restore them when items are searched or paged

To recreate:
1 - Find/Add a bib record with no items
2 - Add 20 items from Centerville
    Edit ->Edit items -> enter CENTER1 into barcode ->'Add multiple copies' -> 20
3 - Add 20 items from Fairview as above but enter 'FAIR1' for barcode and 'FAIR ITEM' as callnumber
4 - Add 1 item from Midway with barcode MIDWAY1
5 - Edit a midway patron to grant 'catalogue' and 'edit_items' permission - NOT edit_any_item
6 - Sign in as the patron above
7 - Find the record
8 - Note there is no callnumebr or actions/edit colum
9 - Go to page 2 of items - no callnumber visible though fairview items have them
10 - Go to page 3 - no edit column, though you should be able to edit
Comment 1 Jonathan Druart 2024-10-08 13:43:10 UTC
Created attachment 172526 [details] [review]
Bug 38118: Display columns if not empty in drawCallback

Instead of updating only when DT init is complete we are going to update
the visibility when the table will be redrawn.

Test plan:
1 - Find/Add a bib record with no items
2 - Add 20 items from Centerville
    Edit ->Edit items -> enter CENTER1 into barcode ->'Add multiple copies' -> 20
3 - Add 20 items from Fairview as above but enter 'FAIR1' for barcode and 'FAIR ITEM' as callnumber
4 - Add 1 item from Midway with barcode MIDWAY1
5 - Edit a midway patron to grant 'catalogue' and 'edit_items' permission - NOT edit_any_item
6 - Sign in as the patron above
7 - Find the record
8 - Note there is callnumber and actions/edit columns
9 - Go to page 2 of items - callnumber visible
10 - Go to page 3 - edit column
Comment 2 Victor Grousset/tuxayo 2024-10-08 16:51:40 UTC
Created attachment 172541 [details] [review]
Bug 38118: Display columns if not empty in drawCallback

Instead of updating only when DT init is complete we are going to update
the visibility when the table will be redrawn.

Test plan:
1 - Find/Add a bib record with no items
2 - Add 20 items from Centerville
    Edit ->Edit items -> enter CENTER1 into barcode ->'Add multiple copies' -> 20
3 - Add 20 items from Fairview as above but enter 'FAIR1' for barcode and 'FAIR ITEM' as callnumber
4 - Add 1 item from Midway with barcode MIDWAY1
5 - Edit a midway patron to grant 'catalogue' and 'edit_items' permission - NOT edit_any_item
6 - Sign in as the patron above
7 - Find the record
8 - Note there is callnumber and actions/edit columns
9 - Go to page 2 of items - callnumber visible
10 - Go to page 3 - edit column

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Comment 3 Victor Grousset/tuxayo 2024-10-08 16:55:49 UTC
It works! :)

Assuming that's expected to have now the Checkouts, Renewals, Local uses now be visible also.

-----

> 8 - Note there is callnumber and actions/edit columns

Not on page 1, I assume step 9 et 10 take precedence on this.
Comment 4 Nick Clemens (kidclamp) 2024-10-10 11:17:52 UTC
Created attachment 172583 [details] [review]
Bug 38118: Display columns if not empty in drawCallback

Instead of updating only when DT init is complete we are going to update
the visibility when the table will be redrawn.

Test plan:
1 - Find/Add a bib record with no items
2 - Add 20 items from Centerville
    Edit ->Edit items -> enter CENTER1 into barcode ->'Add multiple copies' -> 20
3 - Add 20 items from Fairview as above but enter 'FAIR1' for barcode and 'FAIR ITEM' as callnumber
4 - Add 1 item from Midway with barcode MIDWAY1
5 - Edit a midway patron to grant 'catalogue' and 'edit_items' permission - NOT edit_any_item
6 - Sign in as the patron above
7 - Find the record
8 - Note there is callnumber and actions/edit columns
9 - Go to page 2 of items - callnumber visible
10 - Go to page 3 - edit column

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 5 Katrin Fischer 2024-10-11 09:16:14 UTC
Pushed for 24.11!

Well done everyone, thank you!
Comment 6 Lucas Gass (lukeg) 2024-11-18 22:59:51 UTC
Needs rebased for 24.05.x
Comment 7 Jonathan Druart 2024-11-19 09:09:58 UTC
Created attachment 174763 [details] [review]
[24.05] Bug 38118: Display columns if not empty in drawCallback

Instead of updating only when DT init is complete we are going to update
the visibility when the table will be redrawn.

Test plan:
1 - Find/Add a bib record with no items
2 - Add 20 items from Centerville
    Edit ->Edit items -> enter CENTER1 into barcode ->'Add multiple copies' -> 20
3 - Add 20 items from Fairview as above but enter 'FAIR1' for barcode and 'FAIR ITEM' as callnumber
4 - Add 1 item from Midway with barcode MIDWAY1
5 - Edit a midway patron to grant 'catalogue' and 'edit_items' permission - NOT edit_any_item
6 - Sign in as the patron above
7 - Find the record
8 - Note there is callnumber and actions/edit columns
9 - Go to page 2 of items - callnumber visible
10 - Go to page 3 - edit column
Comment 8 Jonathan Druart 2024-11-19 09:10:12 UTC
(In reply to Lucas Gass (lukeg) from comment #6)
> Needs rebased for 24.05.x

Done but haven't tested it.
Comment 9 Jonathan Druart 2024-11-19 09:10:50 UTC
(In reply to Jonathan Druart from comment #8)
> (In reply to Lucas Gass (lukeg) from comment #6)
> > Needs rebased for 24.05.x
> 
> Done but haven't tested it.

And don't forget bug 38240.
Comment 10 Lucas Gass (lukeg) 2024-11-19 15:40:44 UTC
Backported to 24.05.x for upcomign 24.05.06
Comment 11 Fridolin Somers 2024-12-13 13:45:48 UTC
Depends on Bug 33568 not in 23.11.x