[Bug 12557] New: Cannot revert the changes done by AcqItemSetSubfieldsWhenReceived on canceling a receipt
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12557 Bug ID: 12557 Summary: Cannot revert the changes done by AcqItemSetSubfieldsWhenReceived on canceling a receipt Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Acquisitions Assignee: koha-bugs@lists.koha-community.org Reporter: jonathan.druart@biblibre.com QA Contact: testopia@bugs.koha-community.org Bug 8307 introduces the AcqItemSetSubfieldsWhenReceived pref. You can now update an item field on receiving (if you create items on ordering). But if the receipt is cancel, there is no way to revert these changes. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12557 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Depends on| |8307 Assignee|koha-bugs@lists.koha-commun |jonathan.druart@biblibre.co |ity.org |m -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12557 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12557 --- Comment #1 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 29620 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=29620&action=edit Bug 12557: DB changes - Add the AcqItemSetSubfieldsWhenReceiptIsCancelled pref -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12557 --- Comment #2 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 29621 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=29621&action=edit Bug 12557: Add a way to revert the changes made on items on receving Bug 8307 introduces the AcqItemSetSubfieldsWhenReceived pref. You can now update an item field on receiving (if you create items on ordering). But if the receipt is cancel, there is no way to revert these changes. This patch adds a new pref AcqItemSetSubfieldsWhenReceiptIsCancelled to allow to revert changes previously done on receiving Test plan: 0/ Set the AcqCreateItems to 'ordering' 1/ Fill AcqItemSetSubfieldsWhenReceived with o=1 (UNIMARC) or 7=1 (MARC21). 2/ Fill AcqItemSetSubfieldsWhenReceiptIsCancelled with o=2 (UNIMARC) or 7=2 (MARC21) 3/ Create an order with some items 4/ Receive the order and verify the notforloan value is set to 1 5/ Cancel the receipt and verify the notforloan value is set to 2 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12557 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12557 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #29620|0 |1 is obsolete| | --- Comment #3 from Chris Cormack <chris@bigballofwax.co.nz> --- Created attachment 30886 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=30886&action=edit Bug 12557: DB changes - Add the AcqItemSetSubfieldsWhenReceiptIsCancelled pref Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12557 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #29621|0 |1 is obsolete| | --- Comment #4 from Chris Cormack <chris@bigballofwax.co.nz> --- Created attachment 30887 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=30887&action=edit Bug 12557: Add a way to revert the changes made on items on receving Bug 8307 introduces the AcqItemSetSubfieldsWhenReceived pref. You can now update an item field on receiving (if you create items on ordering). But if the receipt is cancel, there is no way to revert these changes. This patch adds a new pref AcqItemSetSubfieldsWhenReceiptIsCancelled to allow to revert changes previously done on receiving Test plan: 0/ Set the AcqCreateItems to 'ordering' 1/ Fill AcqItemSetSubfieldsWhenReceived with o=1 (UNIMARC) or 7=1 (MARC21). 2/ Fill AcqItemSetSubfieldsWhenReceiptIsCancelled with o=2 (UNIMARC) or 7=2 (MARC21) 3/ Create an order with some items 4/ Receive the order and verify the notforloan value is set to 1 5/ Cancel the receipt and verify the notforloan value is set to 2 Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12557 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA CC| |katrin.fischer@bsz-bw.de --- Comment #5 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I am sorry, but the tests fail for me, could someone else check if they pass for them? perl t/db_dependent/Acquisition/CancelReceipt.t 1..3 ok 1 - Create items on receiving: 0 item exist after cancelling a receipt DBD::mysql::st execute failed: Column 'biblio_auth_number' cannot be null at /home/katrin/kohaclone/C4/Biblio.pm line 2886. DBD::mysql::st execute failed: Column 'biblio_auth_number' cannot be null at /home/katrin/kohaclone/C4/Biblio.pm line 2886. # Looks like you planned 3 tests but ran 1. # Looks like your test exited with 255 just after 1. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12557 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12557 --- Comment #6 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 31009 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=31009&action=edit Bug 12557: UT: The item is not created The UT was buggy. I have just fix that in another patch on bug 12555. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12557 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA --- Comment #7 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- This seems to introduce a new warning in the logs: [Thu Aug 21 09:44:43.051320 2014] [cgi:error] [pid 18243] [client 127.0.0.1:50730] AH01215: [Thu Aug 21 09:44:43 2014] parcel.pl: Use of uninitialized value $line{"parent_ordernumber"} in numeric eq (==) at /home/katrin/kohaclone/acqui/parcel.pl line 198., referer: http://localhost:8080/cgi-bin/koha/acqui/parcel.pl?invoiceid=8&sticky_filters=1 TEST: - Order 3 items (none are 'on order', because status was not set) - Receive 2 - Configure pref to say for MARC21: 7=-1 (set not for loan to 'on order') - Undo receipt - Now all 3 items are 'on order' insted of just the 2 the receipt got reverted for -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12557 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12557 --- Comment #8 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 31039 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=31039&action=edit Bug 12557: Partially received - the change should affect the new order If the receipt in not on the whole order but only on a part of it, the change should be done on the itemnumber linked to the "new order", the one we are reverting. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12557 --- Comment #9 from Jonathan Druart <jonathan.druart@biblibre.com> --- (In reply to Katrin Fischer from comment #7)
This seems to introduce a new warning in the logs:
[Thu Aug 21 09:44:43.051320 2014] [cgi:error] [pid 18243] [client 127.0.0.1:50730] AH01215: [Thu Aug 21 09:44:43 2014] parcel.pl: Use of uninitialized value $line{"parent_ordernumber"} in numeric eq (==) at /home/katrin/kohaclone/acqui/parcel.pl line 198., referer: http://localhost:8080/cgi-bin/koha/acqui/parcel. pl?invoiceid=8&sticky_filters=1
I didn't get this warning (or did not see it). But it should not be introduced by this patch since it does not touch acqui/parcel.pl.
TEST: - Order 3 items (none are 'on order', because status was not set) - Receive 2 - Configure pref to say for MARC21: 7=-1 (set not for loan to 'on order') - Undo receipt - Now all 3 items are 'on order' insted of just the 2 the receipt got reverted for
Good catch! I stupidly forgot to test partial receipt! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12557 --- Comment #10 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 31040 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=31040&action=edit [PASSED QA] Bug 12557: DB changes - Add the AcqItemSetSubfieldsWhenReceiptIsCancelled pref Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Works as described, passes tests and QA script. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12557 --- Comment #11 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 31041 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=31041&action=edit [PASSED QA] Bug 12557: Add a way to revert the changes made on items on receving Bug 8307 introduces the AcqItemSetSubfieldsWhenReceived pref. You can now update an item field on receiving (if you create items on ordering). But if the receipt is cancel, there is no way to revert these changes. This patch adds a new pref AcqItemSetSubfieldsWhenReceiptIsCancelled to allow to revert changes previously done on receiving Test plan: 0/ Set the AcqCreateItems to 'ordering' 1/ Fill AcqItemSetSubfieldsWhenReceived with o=1 (UNIMARC) or 7=1 (MARC21). 2/ Fill AcqItemSetSubfieldsWhenReceiptIsCancelled with o=2 (UNIMARC) or 7=2 (MARC21) 3/ Create an order with some items 4/ Receive the order and verify the notforloan value is set to 1 5/ Cancel the receipt and verify the notforloan value is set to 2 Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12557 --- Comment #12 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 31042 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=31042&action=edit [PASSED QA] Bug 12557: UT: The item is not created The UT was buggy. I have just fix that in another patch on bug 12555. Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12557 --- Comment #13 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 31043 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=31043&action=edit [PASSED QA] Bug 12557: Partially received - the change should affect the new order If the receipt in not on the whole order but only on a part of it, the change should be done on the itemnumber linked to the "new order", the one we are reverting. Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12557 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12557 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #31009|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12557 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #31039|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12557 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #30886|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12557 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #30887|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12557 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master CC| |tomascohen@gmail.com --- Comment #14 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Patches pushed to master. Thanks Jonathan! -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org