A common mistake in training the acquisition module is that the 'quantity received' field is not changed before saving the order receive form. There is no warning or other indication, that this field is needed in order to make the receive happen. I think usability woudl be better with a visual clue or warning there. I am not sure if the field coudl be made mandatory.
Created attachment 107619 [details] [review] Bug 21811: Add JS confirmation when receiving - at least 1 item to receive When receiving, the "receive items" form should not be submitted if no items are going to be received Test plan: Create an order, close the basket, receive some items On the "receive items" form, do not select item (if items are created when placing the order) and submit the form => You must get a JS alert that prevent the form to be submitted Select at least one item, submit again => Now it's submitted
*** Bug 26081 has been marked as a duplicate of this bug. ***
Before this patch we were able to save, and (reading the code) some info were used to update the items' order (like price, datelastseen, etc.) What is the expected behaviour here?
(In reply to Jonathan Druart from comment #3) > Before this patch we were able to save, and (reading the code) some info > were used to update the items' order (like price, datelastseen, etc.) > > What is the expected behaviour here? I am not sure if that behaviour (changing the items when nothing was actually received) was correct at all. I cannot think of a use case right now where you'd want that at this point. I think this should not block this patch. Patch still applied - resetting status in hope to get some more feedback next week from people testing.
I get this error each time there is 1 item left to receive. Software error: Template process failed: undef error - The method Koha::Item->size is not covered by tests! Trace begun at /var/repositories/koha/Koha/Object.pm line 827 Koha::Object::AUTOLOAD('Koha::Item=HASH(0xb30e228)') called at /var/repositories/koha/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt line 234 eval {...} at /var/repositories/koha/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt line 234 eval {...} at /var/repositories/koha/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt line 18 Template::Provider::__ANON__('Template::Context=HASH(0xabeb380)') called at /usr/lib/x86_64-linux-gnu/perl5/5.20/Template/Document.pm line 163 eval {...} at /usr/lib/x86_64-linux-gnu/perl5/5.20/Template/Document.pm line 161 Template::Document::process('Template::Document=HASH(0xb1a5fb0)', 'Template::Context=HASH(0xabeb380)') called at /usr/lib/x86_64-linux-gnu/perl5/5.20/Template/Context.pm line 351 eval {...} at /usr/lib/x86_64-linux-gnu/perl5/5.20/Template/Context.pm line 321 Template::Context::process('Template::Context=HASH(0xabeb380)', 'Template::Document=HASH(0xb1a5fb0)') called at /usr/lib/x86_64-linux-gnu/perl5/5.20/Template/Service.pm line 94 eval {...} at /usr/lib/x86_64-linux-gnu/perl5/5.20/Template/Service.pm line 91 Template::Service::process('Template::Service=HASH(0xa8433f0)', '/var/repositories/koha/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt', 'HASH(0xb0bc8f0)') called at /usr/lib/x86_64-linux-gnu/perl5/5.20/Template.pm line 66 Template::process('Template=HASH(0xaba15d8)', '/var/repositories/koha/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt', 'HASH(0xb0bc8f0)', 'SCALAR(0x41ad5b0)') called at /var/repositories/koha/C4/Templates.pm line 122 C4::Templates::output('C4::Templates=HASH(0x88fcd30)') called at /var/repositories/koha/acqui/orderreceive.pl line 214
(In reply to Séverine Queune from comment #5) > I get this error each time there is 1 item left to receive. > > Software error: > Template process failed: undef error - The method Koha::Item->size is not > covered by tests! hmm, this doesn't look to be related to the patch here. Have you done koha-plack --restart <instance> and do you have the latest koha master version?
That's another bug, I am finding it, sec!
(In reply to Katrin Fischer from comment #7) > That's another bug, I am finding it, sec! Oh yes, just found it ! Bz 26730
We are missing the last follow-up patch from bug 23376. Adding a dependency.
Created attachment 112055 [details] [review] Bug 21811: Add JS confirmation when receiving - at least 1 item to receive When receiving, the "receive items" form should not be submitted if no items are going to be received Test plan: Create an order, close the basket, receive some items On the "receive items" form, do not select item (if items are created when placing the order) and submit the form => You must get a JS alert that prevent the form to be submitted Select at least one item, submit again => Now it's submitted Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Created attachment 112111 [details] [review] Bug 21811: Add JS confirmation when receiving - at least 1 item to receive When receiving, the "receive items" form should not be submitted if no items are going to be received Test plan: Create an order, close the basket, receive some items On the "receive items" form, do not select item (if items are created when placing the order) and submit the form => You must get a JS alert that prevent the form to be submitted Select at least one item, submit again => Now it's submitted Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Nice fix, works as expected, no QA failures. Passing QA
Pushed to master for 20.11, thanks to everybody involved!
missing dependencies for 20.05.x, no backport