Bug 20966 - Add column configuration to table of orders in a basket
Summary: Add column configuration to table of orders in a basket
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on: 21216
Blocks: 19282
  Show dependency treegraph
 
Reported: 2018-06-19 16:51 UTC by Owen Leonard
Modified: 2020-01-06 20:14 UTC (History)
5 users (show)

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


Attachments
Bug 20966: Add column configuration to table of orders in a basket (13.86 KB, patch)
2018-06-19 17:26 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 20966: Add column configuration to table of orders in a basket (13.92 KB, patch)
2018-08-16 11:19 UTC, Claire Gravely
Details | Diff | Splinter Review
Bug 20966: Add column configuration to table of orders in a basket (14.46 KB, patch)
2018-08-30 12:24 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 20966: Add column configuration to table of orders in a basket (15.46 KB, patch)
2018-10-11 12:14 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 20966: (follow-up) Add template variable filter; Fix table export (1.79 KB, patch)
2018-10-29 13:46 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 20966: (follow-up) Add template variable filter; Fix table export (2.25 KB, patch)
2018-10-30 16:19 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 20966: Add column configuration to table of orders in a basket (15.53 KB, patch)
2018-11-01 11:50 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 20966: (follow-up) Add template variable filter; Fix table export (2.32 KB, patch)
2018-11-01 11:50 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 20966: Add column configuration to table of orders in a basket (15.63 KB, patch)
2018-11-02 15:22 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 20966: (follow-up) Add template variable filter; Fix table export (2.40 KB, patch)
2018-11-02 15:23 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 20966: Add column configuration to table of orders in a basket (14.34 KB, patch)
2018-11-08 22:32 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 20966: (follow-up) Add template variable filter; Fix table export (2.53 KB, patch)
2018-11-08 22:32 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 Owen Leonard 2018-06-19 16:51:05 UTC
I think we should remove the "show all details" checkbox from acqui/basket.pl and replace it with DataTables column configuration.
Comment 1 Owen Leonard 2018-06-19 17:26:32 UTC Comment hidden (obsolete)
Comment 2 Claire Gravely 2018-08-16 09:46:40 UTC
Hullo, when I click on column visibility I don't get any options to show/hide columns, it is empty.
Comment 3 Claire Gravely 2018-08-16 11:19:25 UTC Comment hidden (obsolete)
Comment 4 Claire Gravely 2018-08-16 11:19:56 UTC
some restart_all magic fixes everything. Signed off
Comment 5 Jonathan Druart 2018-08-17 15:47:34 UTC
(In reply to Owen Leonard from comment #0)
> I think we should remove the "show all details" checkbox from
> acqui/basket.pl and replace it with DataTables column configuration.

I think we should keep the link, now we need 4 clicks to display/hide these columns.
Comment 6 Katrin Fischer 2018-08-29 19:43:30 UTC
Hi Owen, could you take a look at Jonathan's comment#5 and see if that could be done?

Sadly with the recent changes to the templates (filters) this no longer applies. Please rebase!
Comment 7 Owen Leonard 2018-08-30 12:04:16 UTC
(In reply to Jonathan Druart from comment #5)

> I think we should keep the link, now we need 4 clicks to display/hide these
> columns.

I think it's inconsistent to have one method of showing and hiding columns on this page and another method elsewhere (this is true also for batch record modification, which should be updated).
Comment 8 Owen Leonard 2018-08-30 12:24:22 UTC Comment hidden (obsolete)
Comment 9 Owen Leonard 2018-10-11 12:14:04 UTC
Created attachment 80404 [details] [review]
Bug 20966: Add column configuration to table of orders in a basket

This patch adds column configuration to the table of orders in a basket.
It replaces the "Show all details" checkbox which previously was used to
show the hidden "tax included" columns. Now those columns are hidden by
default in the columns configuration file.

To test, apply the patch and view a basket with multiple orders. Test
all DataTables functionality (paging, sorting, filtering) including
showing and hiding columns.

Test with both an open and a closed basket.

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Comment 10 Owen Leonard 2018-10-11 12:15:45 UTC
I had an in-person discussion at KohaCon about this issue and got some positive feedback on the change. I'm hoping folks will take another look.
Comment 11 Katrin Fischer 2018-10-12 05:52:14 UTC
Hi Owen,
I think we should do this, I've tested and the column config makes it quite easy to change the display quickly too. 

Still found some issues:

1) I am not sure if the html filter would be correct here, can you please check?

 FAIL	koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt
   FAIL	  filters
		missing_filter at line 808 (        var columns_settings = [% ColumnsSettings.GetColumns( 'acqui', 'basket', 'orders', 'json' ) %];)

2) Can we suppress the Action columns when exporting to Excel? The line breaks in the 'reason' for not being able to delete the entry also create issues with the formatting (Cancel order                                                                                       Can't cancel order and delete catalog record                                                                                       2 item(s) left                                                                                                                    1 subscription(s) left)
Comment 12 Owen Leonard 2018-10-29 13:46:17 UTC
Created attachment 81498 [details] [review]
Bug 20966: (follow-up) Add template variable filter; Fix table export

This patch makes to corrections:

1. The "$raw" filter has been added to the column configuration
2. The columns configuration now specifies which columns are exported in
   Copy, Excel, etc. operations.

To test, apply the patch and test the various table export buttons on a
both a closed and open basket. Confirm that the 'Modify' and 'Cancel'
columns are not exported.
Comment 13 Katrin Fischer 2018-10-29 21:41:44 UTC
Hi Owen, 

something about the stored columns settings is wrong - it doesn't seem to take into account the default configuration from administration

I checked hidden by default and not toggable for the "Supplier report", but it won't go away.
Comment 14 Owen Leonard 2018-10-30 16:19:05 UTC
Created attachment 81636 [details] [review]
Bug 20966: (follow-up) Add template variable filter; Fix table export

This patch makes to corrections:

1. The "$raw" filter has been added to the column configuration
2. The columns configuration now specifies which columns are exported in
   Copy, Excel, etc. operations.

To test, apply the patch and test the various table export buttons on a
both a closed and open basket. Confirm that the 'Modify' and 'Cancel'
columns are not exported.
Comment 15 Owen Leonard 2018-10-30 16:21:00 UTC
(In reply to Katrin Fischer from comment #13)
> I checked hidden by default and not toggable for the "Supplier report", but
> it won't go away.

Yes, I didn't see that Bug 18639 had added a column, requiring a change to columns_settings.yml.
Comment 16 Katrin Fischer 2018-11-01 11:50:38 UTC
Created attachment 81792 [details] [review]
Bug 20966: Add column configuration to table of orders in a basket

This patch adds column configuration to the table of orders in a basket.
It replaces the "Show all details" checkbox which previously was used to
show the hidden "tax included" columns. Now those columns are hidden by
default in the columns configuration file.

To test, apply the patch and view a basket with multiple orders. Test
all DataTables functionality (paging, sorting, filtering) including
showing and hiding columns.

Test with both an open and a closed basket.

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 17 Katrin Fischer 2018-11-01 11:50:43 UTC
Created attachment 81793 [details] [review]
Bug 20966: (follow-up) Add template variable filter; Fix table export

This patch makes to corrections:

1. The "$raw" filter has been added to the column configuration
2. The columns configuration now specifies which columns are exported in
   Copy, Excel, etc. operations.

To test, apply the patch and test the various table export buttons on a
both a closed and open basket. Confirm that the 'Modify' and 'Cancel'
columns are not exported.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 18 Martin Renvoize (ashimema) 2018-11-02 15:22:58 UTC
Created attachment 81910 [details] [review]
Bug 20966: Add column configuration to table of orders in a basket

This patch adds column configuration to the table of orders in a basket.
It replaces the "Show all details" checkbox which previously was used to
show the hidden "tax included" columns. Now those columns are hidden by
default in the columns configuration file.

To test, apply the patch and view a basket with multiple orders. Test
all DataTables functionality (paging, sorting, filtering) including
showing and hiding columns.

Test with both an open and a closed basket.

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

https://bugs.koha-community.org/show_bug.cgi?id=20996
Comment 19 Martin Renvoize (ashimema) 2018-11-02 15:23:03 UTC
Created attachment 81911 [details] [review]
Bug 20966: (follow-up) Add template variable filter; Fix table export

This patch makes to corrections:

1. The "$raw" filter has been added to the column configuration
2. The columns configuration now specifies which columns are exported in
   Copy, Excel, etc. operations.

To test, apply the patch and test the various table export buttons on a
both a closed and open basket. Confirm that the 'Modify' and 'Cancel'
columns are not exported.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

https://bugs.koha-community.org/show_bug.cgi?id=20996
Comment 20 Martin Renvoize (ashimema) 2018-11-02 15:24:15 UTC
Works well, no regressions found.. passed qa
Comment 21 Nick Clemens (kidclamp) 2018-11-08 21:08:04 UTC
Please rebase
Comment 22 Katrin Fischer 2018-11-08 22:32:03 UTC
Created attachment 82134 [details] [review]
Bug 20966: Add column configuration to table of orders in a basket

This patch adds column configuration to the table of orders in a basket.
It replaces the "Show all details" checkbox which previously was used to
show the hidden "tax included" columns. Now those columns are hidden by
default in the columns configuration file.

To test, apply the patch and view a basket with multiple orders. Test
all DataTables functionality (paging, sorting, filtering) including
showing and hiding columns.

Test with both an open and a closed basket.

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

https://bugs.koha-community.org/show_bug.cgi?id=20996
Comment 23 Katrin Fischer 2018-11-08 22:32:08 UTC
Created attachment 82135 [details] [review]
Bug 20966: (follow-up) Add template variable filter; Fix table export

This patch makes to corrections:

1. The "$raw" filter has been added to the column configuration
2. The columns configuration now specifies which columns are exported in
   Copy, Excel, etc. operations.

To test, apply the patch and test the various table export buttons on a
both a closed and open basket. Confirm that the 'Modify' and 'Cancel'
columns are not exported.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

https://bugs.koha-community.org/show_bug.cgi?id=20996
Comment 24 Nick Clemens (kidclamp) 2018-11-13 16:37:35 UTC
Awesome work all!

Pushed to master for 18.11
Comment 25 Martin Renvoize (ashimema) 2018-11-16 14:24:47 UTC
Enhancement, will not be backported to 18.05.x series.