https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44257 --- Comment #1 from Adolfo Rodríguez Taboada <adolfo.rodriguez@xercode.es> --- Created attachment 212522 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=212522&action=edit Bug 44257: Do not check the "Item information" tab when it is not used When adding orders from a staged file, the "Item information" tab is only used for the selected records that do not bring their own items through MarcItemFieldsToOrder. The save button checked the mandatory subfields of the whole form, so a mandatory subfield of that tab (for example the item type in the ACQ framework) blocked saving even when all the selected records had their own items. The alert also tried to open the tab with the selector ".nav-tabs .items_info", which no longer matches anything since the tabs are built with the tab_item helper, so the user stayed on the first tab without seeing which subfield was missing. This patch checks the mandatory subfields of the "Item information" tab only when at least one of the selected records does not have its own items, and opens the tab with the same selector used in other pages. Test plan: 1. Set AcqCreateItem to "placing an order" 2. Set MarcItemFieldsToOrder to: homebranch: 975$a holdingbranch: 975$b itype: 975$y 3. In the ACQ framework, make the item type (952$y) mandatory, with no default value 4. Stage a MARC file with two records: one with 975 fields ($a CPL, $b CPL, $y BK) and one without them 5. Create a basket and add to it from the staged file 6. Select only the record with 975 fields and click Save => The alert "Some required item subfields are not set" is shown, and the order cannot be saved, although these items do not use the "Item information" tab 7. Apply the patch and clear the browser cache 8. Repeat 6 => The order is saved, with the items from the 975 fields 9. Add to the basket from the staged file again, select the record without 975 fields and click Save without filling the "Item information" tab => The alert is shown and the "Item information" tab is opened, with the item type highlighted 10. Choose an item type and click Save => The order is saved, with an item of that type -- You are receiving this mail because: You are watching all bug changes.