In acquisitions, even if AcqCreateItem is set to create an item at the time of ordering, the item creation form does not display. Instead, this JavaScript error shows in the console: additem.js:176 Uncaught TypeError: window[events[i]] is not a function I believe this regression was introduced by bug 15531.
Can't reproduce this on my installation - the item form shows ok for me. - ACQ framework exists - items are created while ordering - order i tested with was with a new record and 'not standing'
Starting with a fresh database, I could not reproduce the issue!
Confirmed, if aqbasket.is_standing = 1, I get the same error.
This is the expected behavior for standing orders, we just need to get rid of the JS error. Lowering the severity.
Created attachment 57695 [details] [review] Bug 16984: Do not clone the item block for standing orders If AcqCreateItem is set to ordering and the basket is marked as "standing orders", when ordering a JS error is raised: additem.js:176 Uncaught TypeError: window[events[i]] is not a function The item block should not be displayed in that case. Test plan: - Set AcqCreateItem to "ordering" - Create a basket and tick the "Standing orders" checkbox - Add an order to this basket => Without this patch you get the JS error => With this patch applied you will not get it
I have also been unable to reproduce the issue.
(In reply to Claire Gravely from comment #6) > I have also been unable to reproduce the issue. have now reproduced - will retest
Created attachment 58704 [details] [review] Bug 16984: Do not clone the item block for standing orders If AcqCreateItem is set to ordering and the basket is marked as "standing orders", when ordering a JS error is raised: additem.js:176 Uncaught TypeError: window[events[i]] is not a function The item block should not be displayed in that case. Test plan: - Set AcqCreateItem to "ordering" - Create a basket and tick the "Standing orders" checkbox - Add an order to this basket => Without this patch you get the JS error => With this patch applied you will not get it Signed-off-by: Claire Gravely <claire_gravely@hotmail.com>
Created attachment 59867 [details] [review] Bug 16984: Do not clone the item block for standing orders If AcqCreateItem is set to ordering and the basket is marked as "standing orders", when ordering a JS error is raised: additem.js:176 Uncaught TypeError: window[events[i]] is not a function The item block should not be displayed in that case. Test plan: - Set AcqCreateItem to "ordering" - Create a basket and tick the "Standing orders" checkbox - Add an order to this basket => Without this patch you get the JS error => With this patch applied you will not get it Signed-off-by: Claire Gravely <claire_gravely@hotmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Pushed to master for 17.05, thanks Jonathan!
This patch has been pushed to 16.11.x and will be in 16.11.04.
Pushed to 16.05.x, for 16.05.10 release