Bug 24257 - item-transfer-modal does not initiate transfer when 'yes, print slip' is selected
Summary: item-transfer-modal does not initiate transfer when 'yes, print slip' is sele...
Status: Pushed to stable
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Jonathan Druart
QA Contact: Tomás Cohen Arazi
URL:
Keywords:
Depends on: 21346
Blocks:
  Show dependency treegraph
 
Reported: 2019-12-17 15:50 UTC by Lucas Gass
Modified: 2020-01-12 19:14 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:
20.05.00, 19.11.02


Attachments
Bug 24257: Fix close of modal on 'Yes, print slip' (3.09 KB, patch)
2019-12-18 09:39 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 24257: Fix close of modal on 'Yes, print slip' (3.14 KB, patch)
2019-12-18 15:01 UTC, Lucas Gass
Details | Diff | Splinter Review
Bug 24257: Fix close of modal on 'Yes, print slip' (3.20 KB, patch)
2020-01-08 15:43 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Lucas Gass 2019-12-17 15:50:30 UTC
When a item-transfer-modal is prompted by returns.tt and the option "Yes, print slip" is selected the transfer is not initiated and the modal does not disappear.

To recreate:
1. set AutomaticItemReturn to "don't"
2. Check out an item and attempt to check it in at a branch it doesn't belong to.
3. When the popup modal appears select 'Yes, print slip'.
4. Observe that the transfer does not initiate and the modal does not close.
5. In FF this also produces the following console error (this.form.print_slip is undefined)

Choosing 'Yes' works as excepted.
Comment 1 Jonathan Druart 2019-12-18 09:33:08 UTC
Maybe caused by bug 21346.
Comment 2 Jonathan Druart 2019-12-18 09:39:25 UTC
Created attachment 96406 [details] [review]
Bug 24257: Fix close of modal on 'Yes, print slip'

When a item-transfer-modal is prompted by returns.tt and the option
"Yes, print slip" is selected the transfer is not initiated and the
modal does not disappear.

The print_slip hidden input must be in the same form as the
submit/button .print, otherwise the browser logs
  this.form.print_slip is undefined

Test plan:
1. set AutomaticItemReturn to "don't"
2. Check out an item and attempt to check it in at a branch it doesn't
belong to.
3. When the popup modal appears select 'Yes, print slip'.
=> Observe that the transfer does initiate and the modal closes
Comment 3 Lucas Gass 2019-12-18 15:01:12 UTC
Created attachment 96422 [details] [review]
Bug 24257: Fix close of modal on 'Yes, print slip'

When a item-transfer-modal is prompted by returns.tt and the option
"Yes, print slip" is selected the transfer is not initiated and the
modal does not disappear.

The print_slip hidden input must be in the same form as the
submit/button .print, otherwise the browser logs
  this.form.print_slip is undefined

Test plan:
1. set AutomaticItemReturn to "don't"
2. Check out an item and attempt to check it in at a branch it doesn't
belong to.
3. When the popup modal appears select 'Yes, print slip'.
=> Observe that the transfer does initiate and the modal closes

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Comment 4 Lucas Gass 2019-12-18 15:01:53 UTC
Thank you for the quick patch Jonathan!
Comment 5 Tomás Cohen Arazi 2020-01-08 15:43:37 UTC
Created attachment 97007 [details] [review]
Bug 24257: Fix close of modal on 'Yes, print slip'

When a item-transfer-modal is prompted by returns.tt and the option
"Yes, print slip" is selected the transfer is not initiated and the
modal does not disappear.

The print_slip hidden input must be in the same form as the
submit/button .print, otherwise the browser logs
  this.form.print_slip is undefined

Test plan:
1. set AutomaticItemReturn to "don't"
2. Check out an item and attempt to check it in at a branch it doesn't
belong to.
3. When the popup modal appears select 'Yes, print slip'.
=> Observe that the transfer does initiate and the modal closes

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 6 Martin Renvoize 2020-01-09 16:34:10 UTC
Nice work everyone!

Pushed to master for 20.05
Comment 7 Joy Nelson 2020-01-12 19:14:48 UTC
Pushed to 19.11.x branch for 19.11.02