[Bug 36327] New: Items view - Deletion of items is broken
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36327 Bug ID: 36327 Summary: Items view - Deletion of items is broken Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: major Priority: P5 - low Component: Cataloging Assignee: koha-bugs@lists.koha-community.org Reporter: pedro.amorim@ptfs-europe.com QA Contact: testopia@bugs.koha-community.org CC: jonathan.druart@gmail.com, katrin.fischer@bsz-bw.de, m.de.rooy@rijksmuseum.nl, martin.renvoize@ptfs-europe.com, nick@bywatersolutions.com, tomascohen@gmail.com Blocks: 36192 k-t-d 1) visit a biblio details view: http://localhost:8081/cgi-bin/koha/cataloguing/additem.pl?biblionumber=230 2) Click anywhere on one of the items rows 3) Notice 2 actions show up "Edit item" and "Delete item" 4) Click "delete item" 5) Notice nothing happens in the UI 6) Notice console throws the following error: cataloging_additem_23.1200007.js:29 Uncaught ReferenceError: confirm_deletion is not defined at HTMLAnchorElement.<anonymous> (cataloging_additem_23.1200007.js:29:17) at HTMLAnchorElement.dispatch (jquery-3.6.0.min_23.1200007.js:2:43064) at v.handle (jquery-3.6.0.min_23.1200007.js:2:41048) Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36192 [Bug 36192] [OMNIBUS] CSRF Protection for Koha -- 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=36327 Pedro Amorim <pedro.amorim@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Assignee|koha-bugs@lists.koha-commun |pedro.amorim@ptfs-europe.co |ity.org |m -- 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=36327 Pedro Amorim <pedro.amorim@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36327 --- Comment #1 from Pedro Amorim <pedro.amorim@ptfs-europe.com> --- Created attachment 163195 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=163195&action=edit Bug 36327: Preparation: Update form Each delete form now contains the itemnumber to better unambiguosly identify the the itemnumber it refers to The delete button now carries the itemnumber it refers to -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36327 --- Comment #2 from Pedro Amorim <pedro.amorim@ptfs-europe.com> --- Created attachment 163196 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=163196&action=edit Bug 36327: Clean-up old unused code that results in error -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36327 --- Comment #3 from Pedro Amorim <pedro.amorim@ptfs-europe.com> --- Created attachment 163197 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=163197&action=edit Bug 36327: Delete link is no longer a GET href -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36327 --- Comment #4 from Pedro Amorim <pedro.amorim@ptfs-europe.com> --- Created attachment 163198 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=163198&action=edit Bug 36327: Update handling of item delete This needs to be rewritten to .on('click') because the delete item link relevant to this patchset is appended to the dom, this is how we guarantee this event listener is attached to the appended link. This also ensures the same item deletion logic is applied for both button: The delete button from the left 'Actions' dropdown and the 'Delete item' link that pops up when anywhere in the row is clicked 1) visit a biblio details view: http://localhost:8081/cgi-bin/koha/cataloguing/additem.pl?biblionumber=230 2) Click anywhere on one of the items rows 3) Notice 2 actions show up "Edit item" and "Delete item" 4) Click "delete item" 5) Notice nothing happens in the UI 6) Notice console throws the following error: cataloging_additem_23.1200007.js:29 Uncaught ReferenceError: confirm_deletion is not defined at HTMLAnchorElement.<anonymous> (cataloging_additem_23.1200007.js:29:17) at HTMLAnchorElement.dispatch (jquery-3.6.0.min_23.1200007.js:2:43064) at v.handle (jquery-3.6.0.min_23.1200007.js:2:41048) 7) Apply patches 8) Notice console error no longer shows 9) Notice delete confirmation is shown, notice clicking it deletes the correct item. 10) Notice the delete item link anywhere in the item row has the same behavior as the 'Delete' option under 'Actions' on the leftmost column of the table -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36327 Jonathan Druart <jonathan.druart@gmail.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=36327 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #163195|0 |1 is obsolete| | Attachment #163196|0 |1 is obsolete| | Attachment #163197|0 |1 is obsolete| | Attachment #163198|0 |1 is obsolete| | --- Comment #5 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 163228 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=163228&action=edit Bug 36327: Preparation: Update form Each delete form now contains the itemnumber to better unambiguosly identify the the itemnumber it refers to The delete button now carries the itemnumber it refers to Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36327 --- Comment #6 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 163229 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=163229&action=edit Bug 36327: Clean-up old unused code that results in error Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36327 --- Comment #7 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 163230 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=163230&action=edit Bug 36327: Delete link is no longer a GET href Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36327 --- Comment #8 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 163231 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=163231&action=edit Bug 36327: Update handling of item delete This needs to be rewritten to .on('click') because the delete item link relevant to this patchset is appended to the dom, this is how we guarantee this event listener is attached to the appended link. This also ensures the same item deletion logic is applied for both button: The delete button from the left 'Actions' dropdown and the 'Delete item' link that pops up when anywhere in the row is clicked 1) visit a biblio details view: http://localhost:8081/cgi-bin/koha/cataloguing/additem.pl?biblionumber=230 2) Click anywhere on one of the items rows 3) Notice 2 actions show up "Edit item" and "Delete item" 4) Click "delete item" 5) Notice nothing happens in the UI 6) Notice console throws the following error: cataloging_additem_23.1200007.js:29 Uncaught ReferenceError: confirm_deletion is not defined at HTMLAnchorElement.<anonymous> (cataloging_additem_23.1200007.js:29:17) at HTMLAnchorElement.dispatch (jquery-3.6.0.min_23.1200007.js:2:43064) at v.handle (jquery-3.6.0.min_23.1200007.js:2:41048) 7) Apply patches 8) Notice console error no longer shows 9) Notice delete confirmation is shown, notice clicking it deletes the correct item. 10) Notice the delete item link anywhere in the item row has the same behavior as the 'Delete' option under 'Actions' on the leftmost column of the table Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36327 Jonathan Druart <jonathan.druart@gmail.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=36327 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |36377 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36377 [Bug 36377] Fix translatability issues in koha-backend.js -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36327 --- Comment #9 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- There are some new and some pre-existing translatability issues with this one, I filed a separate bug: Bug 36377 - Fix translatability issues in koha-backend.js -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36327 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks|36377 | Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36377 [Bug 36377] Fix translatability issues in koha-backend.js -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36327 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |24.05.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=36327 --- Comment #10 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Pushed for 24.05! Well done everyone, thank you! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36327 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m --- Comment #11 from Fridolin Somers <fridolin.somers@biblibre.com> --- Does this depend on Bug 34478 ? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36327 --- Comment #12 from Pedro Amorim <pedro.amorim@ptfs-europe.com> --- (In reply to Fridolin Somers from comment #11)
Does this depend on Bug 34478 ?
I set this as blocking bug 36192 to relate to the CSRF. I'm unsure and confused as what it should be, block bug 36192 or depend on bug 34478? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36327 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|Pushed to master |RESOLVED --- Comment #13 from Fridolin Somers <fridolin.somers@biblibre.com> --- I dont reproduce on 23.11.x so surely depend on bug 34478 I dont backport -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org