[Bug 38987] New: Cannot link authorities with other authorities
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38987 Bug ID: 38987 Summary: Cannot link authorities with other authorities Change sponsored?: --- Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: major Priority: P5 - low Component: MARC Authority data support Assignee: koha-bugs@lists.koha-community.org Reporter: a.roussos@dataly.gr QA Contact: testopia@bugs.koha-community.org Starting with Koha 24.11.01, we can no longer link authorities with other authorities (linking a bibliographic record with an authority still works fine). This affects both MARC21 and UNIMARC instances, and is valid on the main branch, too. -- 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=38987 --- Comment #1 from Andreas Roussos <a.roussos@dataly.gr> --- Steps to reproduce: 1) Navigate to Koha's Authorities module and create a new authority (using the 'Default' authority type). In tab 5, expand field 500 by clicking on its description. 2) Launch the Authority finder form by clicking on the small 'Tag editor' button on the far right of subfield 500$a. 3) Click the yellow 'Search' button at the bottom of the page. When the results appear, click on the '+ Choose' button for one of the authorities (any authority will do). Notice that nothing happens and the Authority finder stays open, whereas normally it should close automatically at this point and transfer you back to the authority editor, copying the info from the authority you selected into the subfields of field 500. Press F12 (works in Chrome and Firefox) to launch the Developer Tools of your browser and notice that in the JavaScript console the following error message has been registered: "Uncaught TypeError: e is null" -- 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=38987 Andreas Roussos <a.roussos@dataly.gr> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Assignee|koha-bugs@lists.koha-commun |a.roussos@dataly.gr |ity.org | --- Comment #2 from Andreas Roussos <a.roussos@dataly.gr> --- Analysis of the Bug: Clicking on one of the '+ Choose' buttons actually calls the doauth() function, defined in koha-tmpl/intranet-tmpl/prog/en/modules/authorities/searchresultlist-auth.tt: 143 function doauth(authid, index, repet){ 144 [% IF source == 'auth' %] 145 var e = document.getElementById("relationship"); 146 var relationship = e.options[e.selectedIndex].value; 147 148 jumpfull('blinddetail-biblio-search.pl?authid=' + authid + '&index=' + index + '&repet=' + repet + '&relationship=' + relationship); 149 [% ELSE %] 150 jumpfull('blinddetail-biblio-search.pl?authid=' + authid + '&index=' + index + '&repet=' + repet); 151 [% END %] 152 } As per the code above, whenever authority-to-authority linking takes place (source == 'auth'), `e` is the JavaScript variable assigned to the object/HTML element with an id attribute equal to 'relationship'. This refers to the 'Special relationship' dropdown menu that allows you to select a relationship code before picking an authority with the '+ Choose' button. Commit a605c070c7 (from Bug 31470) introduced a change to koha-tmpl/intranet-tmpl/prog/en/includes/auth-finder-search.inc which renamed the id attribute of the 'Special relationship' <select> element from 'relationship' to 'special_relationship'. Therefore the fix for this Bug is trivial, and involves just a change in the `getElementById()` call. Additionally, to avoid any confusion regarding the variable name (AIUI `e` is often used for Event objects), I'm suggesting we rename it to `elem` (short for 'element'). -- 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=38987 Andreas Roussos <a.roussos@dataly.gr> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38987 --- Comment #3 from Andreas Roussos <a.roussos@dataly.gr> --- Created attachment 177284 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=177284&action=edit Bug 38987: Use the correct HTML id attribute Starting with Koha 24.11.01, we can no longer link authorities with other authorities (linking a bibliographic record with an authority still works fine). This affects both MARC21 and UNIMARC instances, and is valid on the main branch, too. This patch fixes that. Test plan: 1) Navigate to Koha's Authorities module and create a new authority (using the 'Default' authority type). In tab 5, expand field 500 by clicking on its description. 2) Launch the Authority finder form by clicking on the small 'Tag editor' button on the far right of subfield 500$a. 3) Click the yellow 'Search' button at the bottom of the page. When the results appear, click on the '+ Choose' button for one of the authorities (any authority will do). Notice that nothing happens and the Authority finder stays open, whereas normally it should close automatically at this point and transfer you back to the authority editor, copying the info from the authority you selected into the subfields of field 500. Press F12 (works in Chrome and Firefox) to launch the Developer Tools of your browser and notice that in the JavaScript console the following error message has been registered: "Uncaught TypeError: e is null" 4) Apply this patch (and restart_all for good measure), then press CTRL-F5 to reload all JS assets. 5) Repeat step 3) above; this time, when you click on the '+ Choose' button the authority finder window will close and the contents of the authority you selected will be copied into the subfields of field 500. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38987 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=38987 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #177284|0 |1 is obsolete| | --- Comment #4 from David Nind <david@davidnind.com> --- Created attachment 177310 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=177310&action=edit Bug 38987: Use the correct HTML id attribute Starting with Koha 24.11.01, we can no longer link authorities with other authorities (linking a bibliographic record with an authority still works fine). This affects both MARC21 and UNIMARC instances, and is valid on the main branch, too. This patch fixes that. Test plan: 1) Navigate to Koha's Authorities module and create a new authority (using the 'Default' authority type). In tab 5, expand field 500 by clicking on its description. 2) Launch the Authority finder form by clicking on the small 'Tag editor' button on the far right of subfield 500$a. 3) Click the yellow 'Search' button at the bottom of the page. When the results appear, click on the '+ Choose' button for one of the authorities (any authority will do). Notice that nothing happens and the Authority finder stays open, whereas normally it should close automatically at this point and transfer you back to the authority editor, copying the info from the authority you selected into the subfields of field 500. Press F12 (works in Chrome and Firefox) to launch the Developer Tools of your browser and notice that in the JavaScript console the following error message has been registered: "Uncaught TypeError: e is null" 4) Apply this patch (and restart_all for good measure), then press CTRL-F5 to reload all JS assets. 5) Repeat step 3) above; this time, when you click on the '+ Choose' button the authority finder window will close and the contents of the authority you selected will be copied into the subfields of field 500. Signed-off-by: David Nind <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=38987 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david@davidnind.com Text to go in the| |This fixes adding (or release notes| |editing) authority terms to | |authority records (for | |example, 500$a)- choosing a | |term using the authority | |finder was not adding the | |selected term to the | |authority record (it was | |staying on authority finder | |pop up window, and | |generated a JavaScript | |error). -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38987 --- Comment #5 from Andreas Roussos <a.roussos@dataly.gr> --- Thank you very much, David, for adding the release notes for this! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38987 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|major |normal QA Contact|testopia@bugs.koha-communit |lucas@bywatersolutions.com |y.org | 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=38987 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=38987 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #177310|0 |1 is obsolete| | --- Comment #6 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Created attachment 177325 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=177325&action=edit Bug 38987: Use the correct HTML id attribute Starting with Koha 24.11.01, we can no longer link authorities with other authorities (linking a bibliographic record with an authority still works fine). This affects both MARC21 and UNIMARC instances, and is valid on the main branch, too. This patch fixes that. Test plan: 1) Navigate to Koha's Authorities module and create a new authority (using the 'Default' authority type). In tab 5, expand field 500 by clicking on its description. 2) Launch the Authority finder form by clicking on the small 'Tag editor' button on the far right of subfield 500$a. 3) Click the yellow 'Search' button at the bottom of the page. When the results appear, click on the '+ Choose' button for one of the authorities (any authority will do). Notice that nothing happens and the Authority finder stays open, whereas normally it should close automatically at this point and transfer you back to the authority editor, copying the info from the authority you selected into the subfields of field 500. Press F12 (works in Chrome and Firefox) to launch the Developer Tools of your browser and notice that in the JavaScript console the following error message has been registered: "Uncaught TypeError: e is null" 4) Apply this patch (and restart_all for good measure), then press CTRL-F5 to reload all JS assets. 5) Repeat step 3) above; this time, when you click on the '+ Choose' button the authority finder window will close and the contents of the authority you selected will be copied into the subfields of field 500. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Lucas Gass <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=38987 --- Comment #7 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Reported yesterday, pushed today... not too bad :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38987 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to main Version(s)| |25.05.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38987 --- Comment #8 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Pushed for 25.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=38987 Baptiste Wojtkowski (bwoj) <baptiste.wojtkowski@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|25.05.00 |25.05.00,24.11.08 released in| | Status|Pushed to main |Pushed to stable CC| |baptiste.wojtkowski@biblibr | |e.com --- Comment #9 from Baptiste Wojtkowski (bwoj) <baptiste.wojtkowski@biblibre.com> --- Pushed into 24.11.x for 24.11.08 nice work everyone -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38987 Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |Needs documenting --- Comment #10 from Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz> --- Not backporting to 22.11.x as it wasn't backported to 24.05.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38987 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|Needs documenting |RESOLVED --- Comment #11 from David Nind <david@davidnind.com> --- Bug fix, no updates to the manual required. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org