create feature + configuration similar to "AdditionalFieldsInZ3950ResultSearch" for Authorities "AdditionalFieldsInZ3950AuthResultSearch" as far as I see sub _add_custom_field_rowdata from package C4::Breeding; could be reused if the the code is reflowed a little bit
Created attachment 120139 [details] [review] patches Breeding.pm, cataloguing.pref, z3950_auth_search.tt adds new syspref "AdditionalFieldsInZ3950ResultAuthSearch" for authorities analogous to AdditionalFieldsInZ3950ResultSearch
Hi Mark, some hopefully helpful comments :) Please take a look at the coding guidelines. We only capitalize the first word, so it would be "Additional fields" etc. Easy to fix, just something to keep in mind. Is this meant to be ready for testing? Then don't forget to switch to "Needs signoff" as this will alert the testers and get it in the right queue. But in order for them to be able to test with our tools, we'd need a patch file. Using git bz is really helpful here: https://wiki.koha-community.org/wiki/Git_bz_configuration
Created attachment 120154 [details] [review] Bug 28166: optionally add marc fields to authority search this patch creates a new syspref: AdditionalFieldsInZ3950AuthResultSearch, analogous to AdditionalFieldsInZ3950ResultSearch if this syspref is populated with with comma separated marc fields (eg '100, 400') those fields are displayed in in the z3950_auth_search C4/Breeding.pm was slightly modified to be able to use "_add_custom_field_rowdata" to add the additonal fields koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_auth_search.tt was modified to display the "Addtional fields" conditionally testing: - add set values to AdditionalFieldsInZ3950AuthResultSearch the should show up in the auth_search - AdditionalFieldsInZ3950ResultSearch should also be tested as it is also concerned
Looking much better, thx! But there are lots of unrelated and breaking changes in this patch I am afraid. :( The 0/1 for prefs is correct in master and should not be changed (see bug 22824).
Created attachment 120155 [details] [review] Bug 28166: optionally add marc fields to authority search this patch creates a new syspref: AdditionalFieldsInZ3950AuthResultSearch, analogous to AdditionalFieldsInZ3950ResultSearch if this syspref is populated with with comma separated marc fields (eg '100, 400') those fields are displayed in in the z3950_auth_search C4/Breeding.pm was slightly modified to be able to use "_add_custom_field_rowdata" to add the additonal fields koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_auth_search.tt was modified to display the "Addtional fields" conditionally testing: - add set values to AdditionalFieldsInZ3950AuthResultSearch the should show up in the auth_search - AdditionalFieldsInZ3950ResultSearch should also be tested as it is also concerned
I've redone the patch, plz check again
Hi Mark, something is not quite right with the patch set. The first file is not a real patch file, the second only won't apply - I assume they are both needed from looking at the diffs, but as the first has the wrong format, this is not working. Also, the second file contains a lot of unrelated changes in the yaml file. A change to the sysprefs.sql file is missing (https://wiki.koha-community.org/wiki/System_Preferences) Can you provide one cleaned up patch file for master with all required changes? -------------- Apply? [(y)es, (n)o, (i)nteractive] y Traceback (most recent call last): File "/usr/local/bin/git-bz", line 2711, in <module> applied = do_apply(bug_ref) File "/usr/local/bin/git-bz", line 1820, in do_apply users = bug.server.get_xmlrpc_proxy().User.get({ 'names': [patch.attacher] })['users'] File "/usr/lib/python2.7/xmlrpclib.py", line 1243, in __call__ return self.__send(self.__name, args) File "/usr/lib/python2.7/xmlrpclib.py", line 1602, in __request verbose=self.__verbose File "/usr/lib/python2.7/xmlrpclib.py", line 1283, in request return self.single_request(host, handler, request_body, verbose) File "/usr/lib/python2.7/xmlrpclib.py", line 1331, in single_request response.msg, xmlrpclib.ProtocolError: <ProtocolError for bugs.koha-community.org/xmlrpc.cgi: 404 Not Found>
Created attachment 148749 [details] [review] Bug 28166: Optionally add MARC fields to authority search adds the same feature to Authority Search as in the "normal" Z39.50 search, to display arbitrary marc fields in the search results 1. apply patch 2. go to System preferences->Authorities preferences 3. the new option "AdditionalFieldsInZ3950ResultAuthSearch" shows up 4. enter the additional field numbers you want to see eg '001' 5. make an "Authority" search via Z39.50 6. the new new column "Additional fields" will display 7. sign off ;-) Sponsored-by: Steiermärkische Landesbibliothek
Created attachment 148755 [details] [review] Bug 28166: Optionally add MARC fields to authority search adds the same feature to Authority Search as in the "normal" Z39.50 search, to display arbitrary marc fields in the search results 1. apply patch 2. go to System preferences->Authorities preferences 3. the new option "AdditionalFieldsInZ3950ResultAuthSearch" shows up 4. enter the additional field numbers you want to see eg '001' 5. make an "Authority" search via Z39.50 6. the new new column "Additional fields" will display 7. sign off ;-) Sponsored-by: Steiermärkische Landesbibliothek Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
Created attachment 148778 [details] [review] Bug 28166: Optionally add MARC fields to authority search adds the same feature to Authority Search as in the "normal" Z39.50 search, to display arbitrary marc fields in the search results 1. apply patch 2. go to System preferences->Authorities preferences 3. the new option "AdditionalFieldsInZ3950ResultAuthSearch" shows up 4. enter the additional field numbers you want to see eg '001' 5. make an "Authority" search via Z39.50 6. the new new column "Additional fields" will display 7. sign off ;-) Sponsored-by: Steiermärkische Landesbibliothek Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com> Signed-off-by: Clemens Tubach <clemens.tubach@kit.edu>
This looks neat, I like the feature, the patches need some cleanup Must fix: - the patch adds the function _add_rowdata, I think it's a rebase leftover? - the call from _handle_one_result should be updated to pass the biblio related preference to the updated routine - delete the commented lines from the code Could fix: - the routine should take a hashref, the more parameters we have, the nicer it i s to have them named
Must fix: - the patch adds the function _add_rowdata, I think it's a rebase leftover? => OK, done - the call from _handle_one_result should be updated to pass the biblio related preference to the updated routine => I really don't understand this one, "_handle_one_result" is only used for bibs so nothing changes here - delete the commented lines from the code => OK, done
Created attachment 150590 [details] [review] Bug 28166: Optionally add MARC fields to authority search adds the same feature to Authority Search as in the "normal" Z39.50 search, to display arbitrary marc fields in the search results 1. apply patch 2. go to System preferences->Authorities preferences 3. the new option "AdditionalFieldsInZ3950ResultAuthSearch" shows up 4. enter the additional field numbers you want to see eg '001' 5. make an "Authority" search via Z39.50 6. the new new column "Additional fields" will display 7. sign off ;-) Sponsored-by: Steiermärkische Landesbibliothek Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com> Signed-off-by: Clemens Tubach <clemens.tubach@kit.edu>
Created attachment 150594 [details] [review] Bug 28166: Optionally add MARC fields to authority search adds the same feature to Authority Search as in the "normal" Z39.50 search, to display arbitrary marc fields in the search results 1. apply patch 2. go to System preferences->Authorities preferences 3. the new option "AdditionalFieldsInZ3950ResultAuthSearch" shows up 4. enter the additional field numbers you want to see eg '001' 5. make an "Authority" search via Z39.50 6. the new new column "Additional fields" will display 7. sign off ;-) Sponsored-by: Steiermärkische Landesbibliothek Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com> Signed-off-by: Clemens Tubach <clemens.tubach@kit.edu>
Created attachment 150595 [details] [review] removed comments and _add_rowdata
Created attachment 150596 [details] [review] Bug 28166: Removed comments and _add_rowdata
(Adjusted the commit title to make the QA script happy)
(In reply to Mark Hofstetter from comment #12) > Must fix: > - the call from _handle_one_result should be updated to pass the biblio > related preference to the updated routine > > => I really don't understand this one, "_handle_one_result" is only used for > bibs so nothing changes here _handle_one_result calls _add_custom_field_rowdata Previously _add_custom_field_rowdata fetched the system preference 'AdditionalFieldsInZ3950ResultSearch' After these patches it expects to receive the additional fields in a parameter, we need to update the call C4/Biblio.pm: 317 $row = _add_custom_field_rowdata($row, $marcrecord);
Created attachment 150601 [details] [review] Bug 28166: (follow-up) Restore custom fields for biblios To test: 1 - Add "245$a" to AdditionalFieldsInZ3950ResultSearch preference 2 - Cataloging -> new from z3950 3 - Search and see results have 'additional fields' including the title 4 - Apply other patches 5 - Restart all 6 - Repeat Z39 Additional fields are now blank 7 - Apply thi patch, restart all 8 - Repeat Z39 search. Additional fields are restored
Created attachment 153431 [details] [review] Bug 28166: Optionally add MARC fields to authority search adds the same feature to Authority Search as in the "normal" Z39.50 search, to display arbitrary marc fields in the search results 1. apply patch 2. go to System preferences->Authorities preferences 3. the new option "AdditionalFieldsInZ3950ResultAuthSearch" shows up 4. enter the additional field numbers you want to see eg '001' 5. make an "Authority" search via Z39.50 6. the new new column "Additional fields" will display 7. sign off ;-) Sponsored-by: Steiermärkische Landesbibliothek Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com> Signed-off-by: Clemens Tubach <clemens.tubach@kit.edu> Bug 28166: Removed comments and _add_rowdata Bug 28166: (follow-up) Restore custom fields for biblios To test: 1 - Add "245$a" to AdditionalFieldsInZ3950ResultSearch preference 2 - Cataloging -> new from z3950 3 - Search and see results have 'additional fields' including the title 4 - Apply other patches 5 - Restart all 6 - Repeat Z39 Additional fields are now blank 7 - Apply thi patch, restart all 8 - Repeat Z39 search. Additional fields are restored Bug 28166: (QA follow-up) Fix rebase issue
Had to rebase. Squashed it too to remove some developing cruft.
We need some tests still. Breeding.t now fails.
WARN C4/Breeding.pm WARN tidiness The file is less tidy than before (bad/messy lines before: 217, now: 218) WARN installer/data/mysql/atomicupdate/bug_28166.pl WARN tidiness The file is less tidy than before (bad/messy lines before: 0, now: 5) Since this was written before cutoff date, I wouldnt care too much.
Created attachment 156166 [details] [review] Bug 28166: Optionally add MARC fields to authority search adds the same feature to Authority Search as in the "normal" Z39.50 search, to display arbitrary marc fields in the search results 1. apply patch 2. go to System preferences->Authorities preferences 3. the new option "AdditionalFieldsInZ3950ResultAuthSearch" shows up 4. enter the additional field numbers you want to see eg '001' 5. make an "Authority" search via Z39.50 6. the new new column "Additional fields" will display 7. sign off ;-) Sponsored-by: Steiermärkische Landesbibliothek Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com> Signed-off-by: Clemens Tubach <clemens.tubach@kit.edu> Bug 28166: Removed comments and _add_rowdata Bug 28166: (follow-up) Restore custom fields for biblios To test: 1 - Add "245$a" to AdditionalFieldsInZ3950ResultSearch preference 2 - Cataloging -> new from z3950 3 - Search and see results have 'additional fields' including the title 4 - Apply other patches 5 - Restart all 6 - Repeat Z39 Additional fields are now blank 7 - Apply thi patch, restart all 8 - Repeat Z39 search. Additional fields are restored Bug 28166: (QA follow-up) Fix rebase issue
Created attachment 156167 [details] [review] Bug 28166: (QA follow-up) Fix and tidy tests and code
*** Bug 19844 has been marked as a duplicate of this bug. ***
Created attachment 156550 [details] [review] Bug 28166: Optionally add MARC fields to authority search adds the same feature to Authority Search as in the "normal" Z39.50 search, to display arbitrary marc fields in the search results 1. apply patch 2. go to System preferences->Authorities preferences 3. the new option "AdditionalFieldsInZ3950ResultAuthSearch" shows up 4. enter the additional field numbers you want to see eg '001' 5. make an "Authority" search via Z39.50 6. the new new column "Additional fields" will display 7. sign off ;-) Sponsored-by: Steiermärkische Landesbibliothek Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com> Signed-off-by: Clemens Tubach <clemens.tubach@kit.edu> Bug 28166: Removed comments and _add_rowdata Bug 28166: (follow-up) Restore custom fields for biblios To test: 1 - Add "245$a" to AdditionalFieldsInZ3950ResultSearch preference 2 - Cataloging -> new from z3950 3 - Search and see results have 'additional fields' including the title 4 - Apply other patches 5 - Restart all 6 - Repeat Z39 Additional fields are now blank 7 - Apply thi patch, restart all 8 - Repeat Z39 search. Additional fields are restored Bug 28166: (QA follow-up) Fix rebase issue Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Created attachment 156551 [details] [review] Bug 28166: (QA follow-up) Fix and tidy tests and code Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Please rebase ASAP. Thanks!
Created attachment 157646 [details] [review] Bug 28166: Optionally add MARC fields to authority search adds the same feature to Authority Search as in the "normal" Z39.50 search, to display arbitrary marc fields in the search results 1. apply patch 2. go to System preferences->Authorities preferences 3. the new option "AdditionalFieldsInZ3950ResultAuthSearch" shows up 4. enter the additional field numbers you want to see eg '001' 5. make an "Authority" search via Z39.50 6. the new new column "Additional fields" will display 7. sign off ;-) Sponsored-by: Steiermärkische Landesbibliothek Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com> Signed-off-by: Clemens Tubach <clemens.tubach@kit.edu> Bug 28166: Removed comments and _add_rowdata Bug 28166: (follow-up) Restore custom fields for biblios To test: 1 - Add "245$a" to AdditionalFieldsInZ3950ResultSearch preference 2 - Cataloging -> new from z3950 3 - Search and see results have 'additional fields' including the title 4 - Apply other patches 5 - Restart all 6 - Repeat Z39 Additional fields are now blank 7 - Apply thi patch, restart all 8 - Repeat Z39 search. Additional fields are restored Bug 28166: (QA follow-up) Fix rebase issue Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Created attachment 157647 [details] [review] Bug 28166: (QA follow-up) Fix and tidy tests and code Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Pushed to master for 23.11. Nice work everyone, thanks!
Enhancement not pushed to 23.05.x
Manual updated.