[Bug 33744] New: Plugins not working on duplicated MARC fields
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33744 Bug ID: 33744 Summary: Plugins not working on duplicated MARC fields Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: trivial Priority: P5 - low Component: Cataloging Assignee: koha-bugs@lists.koha-community.org Reporter: matt.blenkinsop@ptfs-europe.com QA Contact: testopia@bugs.koha-community.org CC: m.de.rooy@rijksmuseum.nl AddEventHandlers in cataloging.js uses .data('events') which is now deprecated. This means that a duplicated field with the upload.pl plugin doesn't function as expected as the event handler doesn't pass to the duplicated field. To reproduce: 1) In Administration > MARC frameworks, choose a framework and through the actions button click on MARC structure 2) Search for field 856 3) Click on edit subfields 4) Select subfield "u" using the tabs at the top 5) At the bottom, in the dropdown menu called "Plugin", select "upload.pl" (bottom of the list) and save 6) Navigate to Cataloging and create a new record using the framework you have just edited 7) Click on tab 8 and check you have field 856. Click on the Upload button and the pop up should open as expected allowing you to upload a file 8) Click on the "Repeat this tag" button for the 856 tag 9) Click on the Upload button and nothing will happen 10) Delete the cloned tag 11) On the original tag, click the "Repeat this subfield" button next to the "Upload" button. 12) Click the "Upload" button on the new subfield and the same issue will occur. -- 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=33744 Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |matt.blenkinsop@ptfs-europe |ity.org |.com -- 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=33744 --- Comment #1 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Looks like this is addressed under bug 30975. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33744 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |DUPLICATE --- Comment #2 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- *** This bug has been marked as a duplicate of bug 30975 *** -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33744 --- Comment #3 from Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> --- Created attachment 151270 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=151270&action=edit Bug 33744: Fix deprecated use of .data('events') This patch removes a deprecated internal data structure no longer supported in jQuery. This means that AddEventHandlers now correctly passes events to cloned fields in the MARC record Test plan: 1) Apply patch 2) Repeat steps in the original bug description 3) This time clicking on the Upload button for a cloned field should launch the uploads pop up. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33744 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|DUPLICATE |--- Status|RESOLVED |REOPENED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33744 --- Comment #4 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> ---
This patch removes a deprecated internal data structure no longer supported in jQuery.
// Note: This code depends on the jQuery data for events; this structure // is moved to _data as of jQuery 1.8. - var ev= $(oldcontrol).data('events'); + var ev = $._data(oldcontrol, "events"); You are using an internal structure here. Where we really dont know how long it will be supported. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33744 --- Comment #5 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Perhaps we can use it as a temporary workaround until 30975 gets in ? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33744 Patrick Robitaille <patrick.robitaille@collecto.ca> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |patrick.robitaille@collecto | |.ca -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33744 --- Comment #6 from Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> --- 30975 is still blocked so maybe Marcel is right and we should use this patch as a temporary fix - I'll rebase and re-submit -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33744 Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33744 Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #151270|0 |1 is obsolete| | --- Comment #7 from Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> --- Created attachment 153538 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=153538&action=edit Bug 33744: Fix deprecated use of .data('events') This patch removes a deprecated internal data structure no longer supported in jQuery. This means that AddEventHandlers now correctly passes events to cloned fields in the MARC record Test plan: 1) Apply patch 2) Repeat steps in the original bug description 3) This time clicking on the Upload button for a cloned field should launch the uploads pop up. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33744 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david@davidnind.com See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=30975 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33744 David Nind <david@davidnind.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=33744 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #153538|0 |1 is obsolete| | --- Comment #8 from David Nind <david@davidnind.com> --- Created attachment 154796 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=154796&action=edit Bug 33744: Fix deprecated use of .data('events') This patch removes a deprecated internal data structure no longer supported in jQuery. This means that AddEventHandlers now correctly passes events to cloned fields in the MARC record Test plan: 1) Apply patch 2) Repeat steps in the original bug description 3) This time clicking on the Upload button for a cloned field should launch the uploads pop up. Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
From the user perspective, maybe getting cloning of subfields with
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33744 --- Comment #9 from David Nind <david@davidnind.com> --- I've added some comments to bug 30975 (comment 45) on whether to go ahead with 30975 as is, or go ahead with this one as a temporary measure. plugins/value builders should be the priority? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33744 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |m.de.rooy@rijksmuseum.nl |y.org | --- Comment #10 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Looking here -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33744 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch 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=33744 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #154796|0 |1 is obsolete| | --- Comment #11 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 155081 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=155081&action=edit Bug 33744: Fix cloning (sub)fields with framework plugins This patch is meant as a temporary measure for fixing the problem. Bug 30975 may resolve it further, but this is good for now. Note: The original commit message referred to removing a deprecated internal structure. But this patch actually still uses the structure which has been moved to _data in jQuery now. Test plan: 1) Apply patch 2) Repeat steps in the original bug description 3) This time clicking on the Upload button for a cloned field should launch the uploads pop up. Signed-off-by: David Nind <david@davidnind.com> 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=33744 --- Comment #12 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to David Nind from comment #8)
This patch removes a deprecated internal data structure no longer supported in jQuery. This means that AddEventHandlers now correctly passes events to cloned fields in the MARC record
Took the liberty to further clarify this statement in the commit message. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33744 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=33744 --- Comment #13 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=33744 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |Pushed to stable Version(s)|23.11.00 |23.11.00,23.05.04 released in| | CC| |fridolin.somers@biblibre.co | |m --- Comment #14 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to 23.05.x for 23.05.04 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33744 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.04 |23.11.00,23.05.04,22.11.10 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33744 --- Comment #15 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