Bug 17394 - exporting checkouts with items selects without items in combo-box
Summary: exporting checkouts with items selects without items in combo-box
Status: Pushed to Stable
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: master
Hardware: All All
: P5 - low minor (vote)
Assignee: Fridolin SOMERS
QA Contact: Testopia
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-10-04 10:35 UTC by Fridolin SOMERS
Modified: 2016-12-19 11:10 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:


Attachments
Bug 17394 - exporting checkouts with items selects without items in combo-box (3.26 KB, patch)
2016-10-04 10:44 UTC, Fridolin SOMERS
Details | Diff | Splinter Review
Bug 17394 - exporting checkouts with items selects without items in combo-box (3.26 KB, patch)
2016-10-04 10:56 UTC, Fridolin SOMERS
Details | Diff | Splinter Review
Bug 17394 - exporting checkouts with items selects without items in combo-box (3.31 KB, patch)
2016-10-10 10:28 UTC, Jesse Maseto
Details | Diff | Splinter Review
[PASSED QA] Bug 17394 - exporting checkouts with items selects without items in combo-box (3.38 KB, patch)
2016-11-06 09:54 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 Fridolin SOMERS 2016-10-04 10:35:21 UTC
In checkouts table, the is an export form (when some exports syspref are enabled).
When selecting some checkouts and selecting "ISO2709 with items" in export format combo-box, clicking on "Export" will select "ISO2709 without items" in the export format combo-box.
This is quite strange.
Its because the form as 2 inputs with same name and id "output_format" : an hidden input (the wanted arg for tools/export.pl) and a select (the export format combo-box).
So an action meant on the hidden input impacts the select.
Comment 1 Fridolin SOMERS 2016-10-04 10:44:59 UTC
Created attachment 56018 [details] [review]
Bug 17394 - exporting checkouts with items selects without items in combo-box

In checkouts table, the is an export form (when some exports syspref are enabled).
When selecting some checkouts and selecting "ISO2709 with items" in export format combo-box, clicking on "Export" will select "ISO2709 without items" in the export format combo-box.
This is quite strange.
Its because the form as 2 inputs with same name and id "output_format" : an hidden input (the wanted arg for tools/export.pl) and a select (the export format combo-box).
So an action meant on the hidden input impacts the select.

This patch corrects by changing id and name of the export format combo-box : issues-table-output-format

TEST plan :
- Enable checkouts exports by setting syspref ExportWithCsvProfile with a profile
- Go to circ page of a patron with checkouts : /cgi-bin/koha/circ/circulation.pl?borrowernumber=xxx
- Show checkouts table
- Select some checkboxes in "Export" column
- Select "ISO2709 with items" in export format combo-box
- Click on "Export"
=> Without patch, the export format combo-box changes to "ISO2709 without items"
=> Without patch, the export format combo-box does not changes
- Check the export file contains the items
- Check exports "ISO2709 without items" and "CSV" are OK
Comment 2 Fridolin SOMERS 2016-10-04 10:56:46 UTC
Created attachment 56020 [details] [review]
Bug 17394 - exporting checkouts with items selects without items in combo-box

In checkouts table, the is an export form (when some exports syspref are enabled).
When selecting some checkouts and selecting "ISO2709 with items" in export format combo-box, clicking on "Export" will select "ISO2709 without items" in the export format combo-box.
This is quite strange.
Its because the form as 2 inputs with same name and id "output_format" : an hidden input (the wanted arg for tools/export.pl) and a select (the export format combo-box).
So an action meant on the hidden input impacts the select.

This patch corrects by changing id and name of the export format combo-box : issues-table-output-format

TEST plan :
- Enable checkouts exports by setting syspref ExportWithCsvProfile with a profile
- Go to circ page of a patron with checkouts : /cgi-bin/koha/circ/circulation.pl?borrowernumber=xxx
- Show checkouts table
- Select some checkboxes in "Export" column
- Select "ISO2709 with items" in export format combo-box
- Click on "Export"
=> Without patch, the export format combo-box changes to "ISO2709 without items"
=> With patch, the export format combo-box does not changes
- Check the export file contains the items
- Check exports "ISO2709 without items" and "CSV" are OK
Comment 3 Jesse Maseto 2016-10-10 10:28:46 UTC
Created attachment 56092 [details] [review]
Bug 17394 - exporting checkouts with items selects without items in combo-box

In checkouts table, the is an export form (when some exports syspref are enabled).
When selecting some checkouts and selecting "ISO2709 with items" in export format combo-box, clicking on "Export" will select "ISO2709 without items" in the export format combo-box.
This is quite strange.
Its because the form as 2 inputs with same name and id "output_format" : an hidden input (the wanted arg for tools/export.pl) and a select (the export format combo-box).
So an action meant on the hidden input impacts the select.

This patch corrects by changing id and name of the export format combo-box : issues-table-output-format

TEST plan :
- Enable checkouts exports by setting syspref ExportWithCsvProfile with a profile
- Go to circ page of a patron with checkouts : /cgi-bin/koha/circ/circulation.pl?borrowernumber=xxx
- Show checkouts table
- Select some checkboxes in "Export" column
- Select "ISO2709 with items" in export format combo-box
- Click on "Export"
=> Without patch, the export format combo-box changes to "ISO2709 without items"
=> With patch, the export format combo-box does not changes
- Check the export file contains the items
- Check exports "ISO2709 without items" and "CSV" are OK

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
Comment 4 Katrin Fischer 2016-11-06 09:54:24 UTC
Created attachment 57228 [details] [review]
[PASSED QA] Bug 17394 - exporting checkouts with items selects without items in combo-box

In checkouts table, the is an export form (when some exports syspref are enabled).
When selecting some checkouts and selecting "ISO2709 with items" in export format combo-box, clicking on "Export" will select "ISO2709 without items" in the export format combo-box.
This is quite strange.
Its because the form as 2 inputs with same name and id "output_format" : an hidden input (the wanted arg for tools/export.pl) and a select (the export format combo-box).
So an action meant on the hidden input impacts the select.

This patch corrects by changing id and name of the export format combo-box : issues-table-output-format

TEST plan :
- Enable checkouts exports by setting syspref ExportWithCsvProfile with a profile
- Go to circ page of a patron with checkouts : /cgi-bin/koha/circ/circulation.pl?borrowernumber=xxx
- Show checkouts table
- Select some checkboxes in "Export" column
- Select "ISO2709 with items" in export format combo-box
- Click on "Export"
=> Without patch, the export format combo-box changes to "ISO2709 without items"
=> With patch, the export format combo-box does not changes
- Check the export file contains the items
- Check exports "ISO2709 without items" and "CSV" are OK

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>

Signed-off-by: Katrin Fischer  <katrin.fischer@bsz-bw.de>
Comment 5 Kyle M Hall 2016-11-07 16:44:55 UTC
Pushed to master for 16.11, thanks Frido!
Comment 6 Julian Maurice 2016-11-30 12:15:01 UTC
Pushed to 3.22.x, will be in 3.22.13
Comment 7 Mason James 2016-12-14 12:02:59 UTC
Pushed to 16.05.x, for 16.05.06 release