[Bug 35012] New: Cataloguing plugins (value builder) fired twice on create items form
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35012 Bug ID: 35012 Summary: Cataloguing plugins (value builder) fired twice on create items form Change sponsored?: --- Product: Koha Version: 23.05 Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Acquisitions Assignee: koha-bugs@lists.koha-community.org Reporter: bibliothek@th-wildau.de QA Contact: testopia@bugs.koha-community.org When adding items on received orders (or on created orders) the value builder buttons fire twice when clicked. This could lead to f.e. inventory numbers increased by 2 or other unwanted behaviors to rebuild this behavior: a) build a new basket + order line using "item create on placing an order" b) in the item creation dialog please use the webbrowsers dev tools to analyze the [...] button next to subfield d (Date acquired) and inspect the events that get fired by clicking c) notice the Clicktag_952_subfield_d_* event gets fired twice. This also happens using: "item create on receiving an order" or other cataloguing plugins. -- 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=35012 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |m.de.rooy@rijksmuseum.nl -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35012 --- Comment #1 from Jan Kissig <bibliothek@th-wildau.de> --- It looks like additem.js calls the BindPluginEvents function which is registering the event listeners. Then the ready function for each plugin is also called and registers the event listeners again. -- 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=35012 --- Comment #2 from Jan Kissig <bibliothek@th-wildau.de> --- Created attachment 156792 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=156792&action=edit Bug_35012 test plan: a) build a new basket + order line using "item create on placing an order" b) in the item creation dialog (neworderempty.pl) please use the webbrowsers dev tools to analyze the [...] button next to subfield d (Date acquired) and inspect the events that get fired by clicking c) notice the Clicktag_952_subfield_d_* event gets fired twice. d) apply patch and reload page e) there should be only 1 click handler left (besides the jquery one), which points to the Clicktag_952_subfield_* function -- 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=35012 Jan Kissig <bibliothek@th-wildau.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- 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=35012 Jan Kissig <bibliothek@th-wildau.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #156792|0 |1 is obsolete| | --- Comment #3 from Jan Kissig <bibliothek@th-wildau.de> --- Created attachment 156793 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=156793&action=edit Bug_35012 test plan: a) build a new basket + order line using "item create on placing an order" b) in the item creation dialog (neworderempty.pl) please use the webbrowsers dev tools to analyze the [...] button next to subfield d (Date acquired) and inspect the events that get fired by clicking c) notice the Clicktag_952_subfield_d_* event gets fired twice. d) apply patch and reload page e) there should be only 1 click handler left (besides the jquery one), which points to the Clicktag_952_subfield_* function -- 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=35012 --- Comment #4 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Interesting patch ! Not sure if we are on the right track yet but thats just intuition.. Will be looking. -- 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=35012 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |julian.maurice@biblibre.com --- Comment #5 from Julian Maurice <julian.maurice@biblibre.com> --- Maybe bug 30975 fix this ? -- 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=35012 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Cataloguing plugins (value |Framework item plugins fire |builder) fired twice on |twice on Acquisition item |create items form |blocks -- 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=35012 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|23.05 |master Assignee|koha-bugs@lists.koha-commun |bibliothek@th-wildau.de |ity.org | -- 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=35012 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35012 --- Comment #6 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 158718 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=158718&action=edit Bug 35012: Prevent Click handler firing twice test plan: a) build a new basket + order line using "item create on placing an order" b) in the item creation dialog (neworderempty.pl) please use the webbrowsers dev tools to analyze the [...] button next to subfield d (Date acquired) and inspect the events that get fired by clicking c) notice the Clicktag_952_subfield_d_* event gets fired twice. d) apply patch and reload page e) there should be only 1 click handler left (besides the jquery one), which points to the Clicktag_952_subfield_* function Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> See also bug 35298. You may have seen that the Focus event of dateaccessioned did not fire. But that is related to use of Flatpickr in this plugin. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35012 --- Comment #7 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 158719 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=158719&action=edit Bug 35012: DO_NOT_PUSH - Add action to barcode's Blur event No test plan. See next patch. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35012 --- Comment #8 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 158720 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=158720&action=edit Bug 35012: Apply change to all events We should not just look at Click. Test plan: [1] Apply the example patch for a Blur action in barcode.pl. [2] Check that barcode.pl is active in your framework and that autoBarcode is not disabled. [3] Open the browser dev console. [4] Tab a few times through barcode in the neworderempty form of Acquisition. If you leave the field, the Blur event fires. => Without this patch you will see two console lines (FF may show a little '2' icon at the right side) added. With this patch just one. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35012 --- Comment #9 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Julian Maurice from comment #5)
Maybe bug 30975 fix this ?
Yes, definitely. I recommend to use this as a temporary fix for master and backport it to stable branches. Hopefully, we can push 30975 soon after 23.11 release. And further fix this code. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35012 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #156793|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35012 Jan Kissig <bibliothek@th-wildau.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #158720|0 |1 is obsolete| | --- Comment #10 from Jan Kissig <bibliothek@th-wildau.de> --- Created attachment 158782 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=158782&action=edit Bug 35012: Apply change to all events We should not just look at Click. Test plan: [1] Apply the example patch for a Blur action in barcode.pl. [2] Check that barcode.pl is active in your framework and that autoBarcode is not disabled. [3] Open the browser dev console. [4] Tab a few times through barcode in the neworderempty form of Acquisition. If you leave the field, the Blur event fires. => Without this patch you will see two console lines (FF may show a little '2' icon at the right side) added. With this patch just one. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jan Kissig <jkissig@th-wildau.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35012 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |katrin.fischer@bsz-bw.de |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35012 --- Comment #11 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Next time, please start the test plan with getting into the acquisition module, I was quite getting quite frustrated with the normal item form :D -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35012 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.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35012 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #158719|0 |1 is obsolete| | --- Comment #12 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 158816 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=158816&action=edit Bug 35012: DO_NOT_PUSH - Add action to barcode's Blur event No test plan. See next patch. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35012 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #158718|0 |1 is obsolete| | --- Comment #13 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 158817 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=158817&action=edit Bug 35012: Prevent Click handler firing twice test plan: a) build a new basket + order line using "item create on placing an order" b) in the item creation dialog (neworderempty.pl) please use the webbrowsers dev tools to analyze the [...] button next to subfield d (Date acquired) and inspect the events that get fired by clicking c) notice the Clicktag_952_subfield_d_* event gets fired twice. d) apply patch and reload page e) there should be only 1 click handler left (besides the jquery one), which points to the Clicktag_952_subfield_* function Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> See also bug 35298. You may have seen that the Focus event of dateaccessioned did not fire. But that is related to use of Flatpickr in this plugin. Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35012 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #158782|0 |1 is obsolete| | --- Comment #14 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 158818 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=158818&action=edit Bug 35012: Apply change to all events We should not just look at Click. Test plan: [1] Apply the example patch for a Blur action in barcode.pl. [2] Check that barcode.pl is active in your framework and that autoBarcode is not disabled. [3] Open the browser dev console. [4] Tab a few times through barcode in the neworderempty form of Acquisition. If you leave the field, the Blur event fires. => Without this patch you will see two console lines (FF may show a little '2' icon at the right side) added. With this patch just one. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jan Kissig <jkissig@th-wildau.de> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35012 --- Comment #15 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- (In reply to Katrin Fischer from comment #11)
Next time, please start the test plan with getting into the acquisition module, I was quite getting quite frustrated with the normal item form :D
Ok, I realize there is 2 test plans, maybe I should start the weekend :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35012 --- Comment #16 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Katrin Fischer from comment #11)
Next time, please start the test plan with getting into the acquisition module, I was quite getting quite frustrated with the normal item form :D
Ah yes, that would have been helpful indeed :) Thanks. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35012 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |23.11.00 released in| | Status|Passed QA |Pushed to master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35012 --- Comment #17 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Pushed to master for 23.11. Nice work everyone, thanks! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35012 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m Version(s)|23.11.00 |23.11.00,23.05.06 released in| | Status|Pushed to master |Pushed to stable --- Comment #18 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to 23.05.x for 23.05.06 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35012 Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |Pushed to oldstable Version(s)|23.11.00,23.05.06 |23.11.00,23.05.06,22.11.12 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35012 --- Comment #19 from Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> --- Nice work everyone! Pushed to oldstable for 22.11.x -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org