It looks like the 'Hold' column is not taken into account in the numbering, unchecking any column removes the next column over
I think that instead of fixing this (again) we should focus in adding Datatable column configuration to both batch item modification and batch item delete pages as suggested in bug 22926.
I support a fix that prevents this from happening again (as mentioned by Emmi on 2025-03-24) but regardless of which fix is applied, it would be nice if this did get fixed one way or another.
I think I found a good fix
Created attachment 185136 [details] [review] Bug 39423: Fix column checkboxes in batch item modification hide incorrect columns In batch item modification, unchecking any column hides the previous column. This is caused by new HTML in table header : <span class="dt-column-title"></span><span class="dt-column-order"></span> This patch fixed by adding ".dt-column-title" to function guess_nb_cols(). Test plan : 1) Go to batch item modification 2) In "Show/hide columns:" click on "Home library" column => Check correct column is hidden 3) Go to another batch item modification => Check column "Home library" is hidden (from cookie storage)
Created attachment 185149 [details] [review] Bug 39423: Fix column checkboxes in batch item modification hide incorrect columns In batch item modification, unchecking any column hides the previous column. This is caused by new HTML in table header : <span class="dt-column-title"></span><span class="dt-column-order"></span> This patch fixed by adding ".dt-column-title" to function guess_nb_cols(). Test plan : 1) Go to batch item modification 2) In "Show/hide columns:" click on "Home library" column => Check correct column is hidden 3) Go to another batch item modification => Check column "Home library" is hidden (from cookie storage) Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi>
Created attachment 185264 [details] [review] Bug 39423: Fix column checkboxes in batch item modification hide incorrect columns In batch item modification, unchecking any column hides the previous column. This is caused by new HTML in table header : <span class="dt-column-title"></span><span class="dt-column-order"></span> This patch fixed by adding ".dt-column-title" to function guess_nb_cols(). Test plan : 1) Go to batch item modification 2) In "Show/hide columns:" click on "Home library" column => Check correct column is hidden 3) Go to another batch item modification => Check column "Home library" is hidden (from cookie storage) Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Nice work everyone! Pushed to main for 25.11