[Bug 43793] New: 26.05.04 backport of bug 42605 is incomplete
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43793 Bug ID: 43793 Summary: 26.05.04 backport of bug 42605 is incomplete Initiative type: --- Sponsorship --- status: Product: Koha Version: 26.05 Hardware: All OS: All Status: NEW Severity: major Priority: P5 - low Component: Acquisitions Assignee: koha-bugs@lists.koha-community.org Reporter: mark@hofstetter.at QA Contact: testopia@bugs.koha-community.org Target Milestone: --- This is a follow-up to bug 42605: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42605 The fix released in Koha 26.05.04 only corrects AcqCreateItem. UniqueItemFields is still converted to the numeric value 0/1, so the acquisition receiving dialog remains broken when items are created on receipt. Tested package ============== koha-common 26.05.04-1 Steps to reproduce ================== 1. Set AcqCreateItem to "receiving an order". 2. Set UniqueItemFields to a non-empty value, for example "barcode|stocknumber". 3. Create an order and open it for receipt. 4. Observe that the receiving dialog remains on its loading indicator and the item-entry form is not displayed. Actual result ============= The English template shipped with 26.05.04 contains: Koha.addPrefs({ AcqCreateItem: "[% Koha.Preference('AcqCreateItem') | html %]", UniqueItemFields: [% Koha.Preference('UniqueItemFields') ? 1 : 0 | html %], }); JavaScript therefore receives the number 1 and additem.js fails when it calls: unique_item_fields.split("|") Expected result =============== Both preferences must remain strings: Koha.addPrefs({ AcqCreateItem: "[% Koha.Preference('AcqCreateItem') | html %]", UniqueItemFields: "[% Koha.Preference('UniqueItemFields') || '' | html %]", }); Cause ===== On main, commit 35b58d65c5 from bug 43211 had already corrected UniqueItemFields before bug 42605 commit 757b347bed was applied. The latter therefore only changes AcqCreateItem in its final diff. The 26.05.04 backport appears to include 757b347bed without the relevant change from 35b58d65c5. This makes the stable backport incomplete even though bug 42605 is listed as fixed in 26.05.04. The same incorrect expression is present in the packaged English and de-DE templates. Applying the expected line locally and restarting Plack restores the item-entry form. Please backport the missing UniqueItemFields change to 26.05.x and include it in the next maintenance release. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43793 Mark Hofstetter <mark@hofstetter.at> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43793 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david@davidnind.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43793 --- Comment #1 from Andrii Nugged <nugged@gmail.com> --- Created attachment 208233 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=208233&action=edit Bug 43793: [26.05.x] Pass AcqCreateItem to receiving page as a string The 26.05.x backport of bug 43211 brought back the boolean form of AcqCreateItem on acqui/orderreceive.tt, after bug 42605 had changed it to the preference string. On main bug 43211 was pushed before bug 42605, so main already has the string. AcqCreateItem is "ordering", "receiving" or "cataloguing". When a basket inherits the preference, the page compares 1 against these values, none matches, the items created on ordering are not listed and none of them is sent as received. They keep their "Ordered" not for loan status. Test plan: Before applying the patch: 1. Go to Administration > System preferences and note the original AcqCreateItem and AcqItemSetSubfieldsWhenReceived values. 2. Set AcqCreateItem to "placing an order". 3. Set AcqItemSetSubfieldsWhenReceived to a not for loan value different from the ordering value (for example 7=0 for MARC21). 4. In Acquisitions, open a vendor and create a basket. Leave "Create items when" at the system preference. 5. Add an order with 3 items and set their Not for loan status to "Ordered". 6. Close the basket. 7. Receive shipments for the vendor, enter an invoice number, and click Receive on the order line. 8. Note the item list is missing. Receive 1 item, then open the record: all 3 items still have their ordering status. Apply the patch. After applying the patch: 1. Repeat steps 4-7 with a new basket and invoice number. 2. Note all 3 items are listed. 3. Select 1 item and receive it. 4. Open the record. The selected item has the received status; the other 2 items keep their ordering status. 5. Restore both system preferences to their original values. Co-Authored-By: Loontik <loontik@nugged.team> -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43793 Andrii Nugged <nugged@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |nugged@gmail.com |ity.org | See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=43211 Status|NEW |Needs Signoff --- Comment #2 from Andrii Nugged <nugged@gmail.com> --- The current 26.05.x branch has the other half of this problem. 1. 26.05.04 shipped bug 42605 with AcqCreateItem as a string and UniqueItemFields still as 0/1, as described above. 2. The 26.05.x backport of bug 43211 (f0faa7046b7) then changed UniqueItemFields to the string, but the same hunk turned AcqCreateItem back into "? 1 : 0". On main bug 43211 does not touch the AcqCreateItem line. So on 26.05.x HEAD (a775ed1da15) UniqueItemFields is fine and AcqCreateItem is broken again: AcqCreateItem: [% Koha.Preference('AcqCreateItem') ? 1 : 0 | html %], UniqueItemFields: "[% Koha.Preference('UniqueItemFields') || '' | html %]", When a basket inherits AcqCreateItem, the receiving page compares 1 against "ordering"/"receiving", nothing matches, the items created on ordering are not listed and none of them is received. They keep their ordering not for loan status. Libraries on 26.05.x are reporting exactly this. The attached patch restores the AcqCreateItem line from bug 42605. After it, both lines are identical to main. The test plan is in the commit message. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43793 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |rel_26_05_candidate -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43793 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|rel_26_05_candidate | Version(s)| |26.05.05 released in| | --- Comment #3 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Backported to 26.05.x for upcoming 26.05.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43793 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43793 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43793 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org