To test: * Create order * Stage file of MARC records * Order from staged file * Select file * Select one or more records for ordering using the checkbox * Set the fund on the Accounting page * Save Nothing happens, there is JavaScript error in the console: Uncaught Error: cannot call methods on tabs prior to initialization; attempted to call method 'option'
To test: * Create order * Stage file of MARC records * Order from staged file * Select file * Select one or more records for ordering using the checkbox * Save: You get: Some budgets are not defined in item records * IMPORTANT: Set the funds on the "Default accounting details" tab * Save again: nothing happens New bug: that error is actually wrong too.... budgets should be funds.
I think this might actually be due to the item type from the staged file not being correctly used to meet the itype requirement on the Item Information tab. I was getting the same error you pasted on trying to add one of three records from a MARC file before I touched anything on the accounting tab (following the test plan on bug 32166). When I selected an item type, the error cleared and the order saved.
Created attachment 143905 [details] [review] Bug 32045: Use bootstrap tabs to select item tab When the form to add orders from a staged file is validated, we use toptabs functionality to switch to the item tab if there are missing fields. The display now uses bootstrap tabs, so the JS is throwing an error: Uncaught Error: cannot call methods on tabs prior to initialization; attempted to call method 'option' This patch simply switches the call to switch tabs To test: 1 - Stage a file for import 2 - Either use Marc(Item)FieldsToOrder to populate the orders or select a budget on the third tab 3 - View the second tab, items info, confirm itemtype is required, but don't populate it 4 - Attempt to save order, nothing happens 5 - Check the JS console (F12) 6 - Note the error: Uncaught Error: cannot call methods on tabs prior to initialization; attempted to call method 'option' 7 - Apply patch 8 - Cancel and add from staged file again 9 - Select a budget and save 10 - You now get an error popup: Some required item subfields are not set 11 - Confirm after the error you are shown the items tab 12 - Select itemtype 13 - Save 14 - Confirm orders added successfully
Created attachment 143909 [details] [review] Bug 32045: Use bootstrap tabs to select item tab When the form to add orders from a staged file is validated, we use toptabs functionality to switch to the item tab if there are missing fields. The display now uses bootstrap tabs, so the JS is throwing an error: Uncaught Error: cannot call methods on tabs prior to initialization; attempted to call method 'option' This patch simply switches the call to switch tabs To test: 1 - Stage a file for import 2 - Either use Marc(Item)FieldsToOrder to populate the orders or select a budget on the third tab 3 - View the second tab, items info, confirm itemtype is required, but don't populate it 4 - Attempt to save order, nothing happens 5 - Check the JS console (F12) 6 - Note the error: Uncaught Error: cannot call methods on tabs prior to initialization; attempted to call method 'option' 7 - Apply patch 8 - Cancel and add from staged file again 9 - Select a budget and save 10 - You now get an error popup: Some required item subfields are not set 11 - Confirm after the error you are shown the items tab 12 - Select itemtype 13 - Save 14 - Confirm orders added successfully Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Thx for investigating!
(In reply to Katrin Fischer from comment #5) > Thx for investigating! Thank you for filing a bug that helped explain why the test plan for something else was giving me trouble :)
QAing
Created attachment 144051 [details] [review] Bug 32045: Use bootstrap tabs to select item tab When the form to add orders from a staged file is validated, we use toptabs functionality to switch to the item tab if there are missing fields. The display now uses bootstrap tabs, so the JS is throwing an error: Uncaught Error: cannot call methods on tabs prior to initialization; attempted to call method 'option' This patch simply switches the call to switch tabs To test: 1 - Stage a file for import 2 - Either use Marc(Item)FieldsToOrder to populate the orders or select a budget on the third tab 3 - View the second tab, items info, confirm itemtype is required, but don't populate it 4 - Attempt to save order, nothing happens 5 - Check the JS console (F12) 6 - Note the error: Uncaught Error: cannot call methods on tabs prior to initialization; attempted to call method 'option' 7 - Apply patch 8 - Cancel and add from staged file again 9 - Select a budget and save 10 - You now get an error popup: Some required item subfields are not set 11 - Confirm after the error you are shown the items tab 12 - Select itemtype 13 - Save 14 - Confirm orders added successfully Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Pushed to master for 22.11. Nice work everyone, thanks!