The table for stock rotation rotas is not sortable yet. It would be nice if it was. - Go to Tools > Stock rotation - Add some rotas using "New rota" - Verify table is not sortable
Created attachment 84406 [details] [review] Bug 22175: Make stock rotation table sortable This patch adds sorting and column configuration to the stock rotation tables, both rotas and items. No new defaults for the table are defined. To test, apply the patch and clear your browser cache if necessary. - Go to Tools -> Stock rotation. - In the table of rotas test that sorting works correctly. - Test that the "Column visibility" button works to show and hide columns. The "actions" column should be excluded. - Test that export options (Excel, CSV, etc) exclude the "actions" column. - Choose a rota with multiple items on it and select manage -> stages. Repeat the above DataTables functionality tests. - Go to Administration -> Columns settings and edit the default configuration of the stock rotation tables. Confirm that these changes are reflected in the corresponding tables.
Created attachment 84421 [details] [review] Bug 22175: Make stock rotation table sortable This patch adds sorting and column configuration to the stock rotation tables, both rotas and items. No new defaults for the table are defined. To test, apply the patch and clear your browser cache if necessary. - Go to Tools -> Stock rotation. - In the table of rotas test that sorting works correctly. - Test that the "Column visibility" button works to show and hide columns. The "actions" column should be excluded. - Test that export options (Excel, CSV, etc) exclude the "actions" column. - Choose a rota with multiple items on it and select manage -> stages. Repeat the above DataTables functionality tests. - Go to Administration -> Columns settings and edit the default configuration of the stock rotation tables. Confirm that these changes are reflected in the corresponding tables. Signed-off-by: Jose-Mario Monteiro-Santos <jose-mario.monteiro-santos@inLibro.com>
"- Choose a rota with multiple items on it and select manage -> stages. Repeat the above DataTables functionality tests." I assumed this meant manage -> items, since that's where the DataTable is. Also, I'm not sure if this is expected behavior but when exporting the rota table, the "Number of items" column isn't exported.
(In reply to José-Mario Monteiro-Santos from comment #3) > I assumed this meant manage -> items, since that's where the DataTable is. Yes, sorry about that. > Also, I'm not sure if this is expected behavior but when exporting the rota > table, the "Number of items" column isn't exported. That isn't expected, so I'll take another look at it.
Created attachment 84637 [details] [review] Bug 22175: Make stock rotation table sortable This patch adds sorting and column configuration to the stock rotation tables, both rotas and items. No new defaults for the table are defined. To test, apply the patch and clear your browser cache if necessary. - Go to Tools -> Stock rotation. - In the table of rotas test that sorting works correctly. - Test that the "Column visibility" button works to show and hide columns. The "actions" column should be excluded. - Test that export options (Excel, CSV, etc) exclude the "actions" column. - Choose a rota with multiple items on it and select manage -> items. Repeat the above DataTables functionality tests. - Go to Administration -> Columns settings and edit the default configuration of the stock rotation tables. Confirm that these changes are reflected in the corresponding tables.
Created attachment 84897 [details] [review] Bug 22175: Make stock rotation table sortable This patch adds sorting and column configuration to the stock rotation tables, both rotas and items. No new defaults for the table are defined. To test, apply the patch and clear your browser cache if necessary. - Go to Tools -> Stock rotation. - In the table of rotas test that sorting works correctly. - Test that the "Column visibility" button works to show and hide columns. The "actions" column should be excluded. - Test that export options (Excel, CSV, etc) exclude the "actions" column. - Choose a rota with multiple items on it and select manage -> items. Repeat the above DataTables functionality tests. - Go to Administration -> Columns settings and edit the default configuration of the stock rotation tables. Confirm that these changes are reflected in the corresponding tables. Signed-off-by: Jose-Mario Monteiro-Santos <jose-mario.monteiro-santos@inLibro.com>
Once again, I've noticed that the export function might not function as expected (blame my lack of experience with Koha for not knowing how it's supposed to behave). On other tables, the export buttons only export columns that are set to visible. However, both tables updated by this patch export all columns, regardless of their visibility.
Good catch! Marking Failed QA for Owen to take a look.
Created attachment 87807 [details] [review] Bug 22175: (follow-up) Identify columns to exclude from export Bug 21216 added a way to designate DataTables columns to include in export operations (Copy, CSV, print, etc). However, this solution did not take hidden columns into account. This patch revises the global columns configuration settings so that exports will include only visible columns and will exclude columns with a "noExport" class on the <th>. To test, apply the patch and clear your browser cache if necessary. - Go to Tools -> Stock rotation - In the table of rotas, hide some columns in the table and verify that export operations include only your visible selections, excluding the last column with buttons. - Choose a rota and select Manage -> Items. Test that this table works in the same way.
Created attachment 87847 [details] [review] Bug 22175: Make stock rotation table sortable This patch adds sorting and column configuration to the stock rotation tables, both rotas and items. No new defaults for the table are defined. To test, apply the patch and clear your browser cache if necessary. - Go to Tools -> Stock rotation. - In the table of rotas test that sorting works correctly. - Test that the "Column visibility" button works to show and hide columns. The "actions" column should be excluded. - Test that export options (Excel, CSV, etc) exclude the "actions" column. - Choose a rota with multiple items on it and select manage -> items. Repeat the above DataTables functionality tests. - Go to Administration -> Columns settings and edit the default configuration of the stock rotation tables. Confirm that these changes are reflected in the corresponding tables. Signed-off-by: Jose-Mario Monteiro-Santos <jose-mario.monteiro-santos@inLibro.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 87848 [details] [review] Bug 22175: (follow-up) Identify columns to exclude from export Bug 21216 added a way to designate DataTables columns to include in export operations (Copy, CSV, print, etc). However, this solution did not take hidden columns into account. This patch revises the global columns configuration settings so that exports will include only visible columns and will exclude columns with a "noExport" class on the <th>. To test, apply the patch and clear your browser cache if necessary. - Go to Tools -> Stock rotation - In the table of rotas, hide some columns in the table and verify that export operations include only your visible selections, excluding the last column with buttons. - Choose a rota and select Manage -> Items. Test that this table works in the same way. Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Awesome work all! Pushed to master for 19.05
Enhancement will not be backported to 18.11.x series.