https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44221 --- Comment #1 from Adolfo Rodríguez Taboada <adolfo.rodriguez@xercode.es> --- Created attachment 212305 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=212305&action=edit Bug 44221: Create the items of an order, a receipt or a serial in the order they were added acqui/addorder.pl, acqui/finishreceive.pl and serials/serials-edit.pl group the subfields of the items in a hash by itemid, and create the items looping over keys %itemhash, which is in random order. Keep the order in which each itemid first appears in the form, and create the items in that order. Test plan: 1. Create a basket that creates the items when placing an order (Create items when: placing an order) 2. Add an order from a new empty record with quantity 6, and add 6 items with call numbers 1, 2, 3, 4, 5 and 6, in that order 3. Save the order and look at the items of the record => The items are not created in the order you added them: sorted by itemnumber (or by barcode, if they were generated on save), the call numbers are in random order 4. Repeat with a basket that creates the items when receiving: close it, receive the order with 6 items with call numbers 1 to 6 => Same problem 5. Create a subscription with "Create an item record when receiving this serial", generate several expected issues, select them all in the serial collection, click "Edit serials", set them to Arrived and give each item the call number of its issue => Same problem: the items are created in random order 6. Apply the patch 7. Repeat steps 2 to 5 => The items are created in the order they are in the form: the itemnumbers follow the order of the call numbers (in the serials form the newest issue is shown first, so its item is created first) 8. Sign off Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> -- You are receiving this mail because: You are watching all bug changes.