To replace an authority record via Z39.50/SRU there are two buttons on differents pages but their behaviour is not the same. One pre-fill the search form but the other don't. If I do: 1- go to the detail page of an authority record [Koha]/cgi-bin/koha/authorities/detail.pl?authid=[ID] where Koha is your instance of koha and ID is your authority id 2- On the menu Edit click on the button "Replace record via Z39.50/SRU" Then: "Z39.50 authority search points" pop up but all field are empty. But If I do: 1- go to the detail page of an authority record [Koha]/cgi-bin/koha/authorities/detail.pl?authid=[ID] where Koha is your instance of koha and ID is your authority id 2- On the menu Edit click on the button "Edit record" 3- Click on the button "Replace record via Z39.50/SRU search" Then: "Z39.50 authority search points" pop up with usefull values already filled (for example the Author) There is the same two button for bibliographic record and both of them pre-fill the form.
(be sur to have at least one Z39-50 or SRU serveur set for authority or the fisrt buton won't be displayed)
Indeed, this is a bug (not enhancement)
Created attachment 128378 [details] [review] Fixed pre-filling of the search form from the "Replace record with ZR39.50/SRU" (Authority page detail) Now this action has the same pre-filling behaviour as the "Edit" -> "Edit Record" -> "Replace Record via Z39.50/SRU Search" action. Author Personal - Author Meeting/Conf. - Uniform Title and Subject are filled in if the subfield contains data (like the "Edit->Replace" action). Unimarc and Marc21 specificities are supported. Test Plan : 1) You must have a Z39.50/SRU server for authorities 2) Go to an authority detail page (Author - Uniform title - Subject) 3) First go to "Edit"-> "Edit record" -> "Replace record via..." 4) See that form is prefilled with form data 5) Go back and now click on "Replace Record.." directly 6) See that form is also prefilled with data now
Created attachment 128410 [details] [review] Bug 29173: Fixed pre-filling of the search form from the "Replace record with ZR39.50/SRU" (Authority page detail) Now this action has the same pre-filling behaviour as the "Edit" -> "Edit Record" -> "Replace Record via Z39.50/SRU Search" action. Author Personal - Author Meeting/Conf. - Uniform Title and Subject are filled in if the subfield contains data (like the "Edit->Replace" action). Unimarc and Marc21 specificities are supported. Test Plan : 1) You must have a Z39.50/SRU server for authorities 2) Go to an authority detail page (Author - Uniform title - Subject) 3) First go to "Edit"-> "Edit record" -> "Replace record via..." 4) See that form is prefilled with form data 5) Go back and now click on "Replace Record.." directly 6) See that form is also prefilled with data now https://bugs.koha-community.org/show_bug.cgi?id=29173 Signed-off-by: David Nind <david@davidnind.com>
Comment on attachment 128378 [details] [review] Fixed pre-filling of the search form from the "Replace record with ZR39.50/SRU" (Authority page detail) Not sure what I did - obsoleting the patch. Note: I changed the title of the commit message so it includes the bug number.
(In reply to David Nind from comment #5) > Comment on attachment 128378 [details] [review] [review] > Fixed pre-filling of the search form from the "Replace record with > ZR39.50/SRU" (Authority page detail) > > Not sure what I did - obsoleting the patch. Note: I changed the title of the > commit message so it includes the bug number. Okay, thanks for commit title, I'm new on this so I can made some mistakes :)
> Okay, thanks for commit title, I'm new on this so I can made some mistakes :) 8-) The QA Team are very helpful in helping out new contributors! Here are the guidelines for commits: https://wiki.koha-community.org/wiki/Commit_messages
Hi Marion, I believe this will work nicely for MARC21, but not work for UNIMARC as the fields are quite different. Why in MARC21 100 is a person's name, in UNIMARC it seems to be used quite differently: https://www.ifla.org/g/unimarc-rg/unimarc-authorities-3rd-edition-with-updates/ 100 – General Processing Data (update 2018) So I think we need at least a check on the marcflavor, but it would be even nicer if we could pick out the right fields for UNIMARC as well. Also I wonder if we could avoid querying the record twice, but someone else might be better suited to comment on that: my $record = GetAuthority($authid); my $authobj = Koha::Authorities->find($authid);
(In reply to Katrin Fischer from comment #8) > Hi Marion, > > I believe this will work nicely for MARC21, but not work for UNIMARC as the > fields are quite different. > > Why in MARC21 100 is a person's name, in UNIMARC it seems to be used quite > differently: > > https://www.ifla.org/g/unimarc-rg/unimarc-authorities-3rd-edition-with- > updates/ > 100 – General Processing Data (update 2018) > > So I think we need at least a check on the marcflavor, but it would be even > nicer if we could pick out the right fields for UNIMARC as well. > > Also I wonder if we could avoid querying the record twice, but someone else > might be better suited to comment on that: > > my $record = GetAuthority($authid); > my $authobj = Koha::Authorities->find($authid); Hi Katrin, Thank you for looking at this bug. I must point out that I did nothing on this bug (exept filing it). Thibaud is the one who wrote the patch :)
> Hi Katrin, > > Thank you for looking at this bug. > > I must point out that I did nothing on this bug (exept filing it). > Thibaud is the one who wrote the patch :) I am sorry, misreading on my part.
Created attachment 128728 [details] [review] Bug 29173: Fixed pre-filling of the search form from the "Replace record with ZR39.50/SRU" (Authority page detail) Now this action has the same pre-filling behaviour as the "Edit" -> "Edit Record" -> "Replace Record via Z39.50/SRU Search" action. Author Personal - Author Meeting/Conf. - Uniform Title and Subject are filled in if the subfield contains data (like the "Edit->Replace" action). Unimarc and Marc21 specificities are supported. Test Plan : 1) You must have a Z39.50/SRU server for authorities 2) Go to an authority detail page (Author - Uniform title - Subject) 3) First go to "Edit"-> "Edit record" -> "Replace record via..." 4) See that form is prefilled with form data 5) Go back and now click on "Replace Record.." directly 6) See that form is also prefilled with data now
Created attachment 128730 [details] [review] Bug 29173: Fixed pre-filling of the search form from the "Replace record with ZR39.50/SRU" (Authority page detail) Now this action has the same pre-filling behaviour as the "Edit" -> "Edit Record" -> "Replace Record via Z39.50/SRU Search" action. Author Personal - Author Meeting/Conf. - Uniform Title and Subject are filled in if the subfield contains data (like the "Edit->Replace" action). Unimarc and Marc21 specificities are supported. Test Plan : 1) You must have a Z39.50/SRU server for authorities 2) Go to an authority detail page (Author - Uniform title - Subject) 3) First go to "Edit"-> "Edit record" -> "Replace record via..." 4) See that form is prefilled with form data 5) Go back and now click on "Replace Record.." directly 6) See that form is also prefilled with data now https://bugs.koha-community.org/show_bug.cgi?id=29173 Signed-off-by: David Nind <david@davidnind.com>
Created attachment 128731 [details] [review] Bug 29173: (follow-up) add marcflavour preference in conditions
Thanks to Katrin for the review, I have modified the patch to add the marcflavour preference in the conditions. Regarding these two lines: "my $record = GetAuthority($authid);" This is to get the contents of the fields in the "authfields" array "my $authobj = Koha::Authorities->find($authid);" This is to retrieve the authority as an object and extract the authority type. If there is a simpler method I'm interested of course.
(In reply to Katrin Fischer from comment #8) > Also I wonder if we could avoid querying the record twice, but someone else > might be better suited to comment on that: > > my $record = GetAuthority($authid); > my $authobj = Koha::Authorities->find($authid); Agreed, that certainly could be replaced with my $authority = Koha::Authorities->find($authid); my $record = $authority->record;
Created attachment 128756 [details] [review] Bug 29173: (follow-up) add marcflavour preference in conditions
Created attachment 130192 [details] [review] Bug 29173: Fixed pre-filling of the search form from the "Replace record with ZR39.50/SRU" (Authority page detail) Now this action has the same pre-filling behaviour as the "Edit" -> "Edit Record" -> "Replace Record via Z39.50/SRU Search" action. Author Personal - Author Meeting/Conf. - Uniform Title and Subject are filled in if the subfield contains data (like the "Edit->Replace" action). Unimarc and Marc21 specificities are supported. Test Plan : 1) You must have a Z39.50/SRU server for authorities 2) Go to an authority detail page (Author - Uniform title - Subject) 3) First go to "Edit"-> "Edit record" -> "Replace record via..." 4) See that form is prefilled with form data 5) Go back and now click on "Replace Record.." directly 6) See that form is also prefilled with data now https://bugs.koha-community.org/show_bug.cgi?id=29173 Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: David Nind <david@davidnind.com>
Created attachment 130193 [details] [review] Bug 29173: (follow-up) add marcflavour preference in conditions Signed-off-by: David Nind <david@davidnind.com>
Testing notes (using koha-testing-docker): - Tested using both a MARC21 and UNIMARC installation. - For a UNIMARC installation there is only one way to replace (both before and after the patch is applied): . Select Edit > Edit record . Click on the 'Replace record via Z39.50/SRU search' button => There is no option in the dropdown list to change like a MARC21 installation (Edit > Replace record via Z39.50/SRU search)
(In reply to Jonathan Druart from comment #15) > (In reply to Katrin Fischer from comment #8) > > Also I wonder if we could avoid querying the record twice, but someone else > > might be better suited to comment on that: > > > > my $record = GetAuthority($authid); > > my $authobj = Koha::Authorities->find($authid); > > Agreed, that certainly could be replaced with > > my $authority = Koha::Authorities->find($authid); > my $record = $authority->record; What about this, Thibaud?
Created attachment 130422 [details] [review] Bug 29173 : (follow-up) replace method to get the record from the authority
(In reply to Jonathan Druart from comment #20) > (In reply to Jonathan Druart from comment #15) > > (In reply to Katrin Fischer from comment #8) > > > Also I wonder if we could avoid querying the record twice, but someone else > > > might be better suited to comment on that: > > > > > > my $record = GetAuthority($authid); > > > my $authobj = Koha::Authorities->find($authid); > > > > Agreed, that certainly could be replaced with > > > > my $authority = Koha::Authorities->find($authid); > > my $record = $authority->record; > > What about this, Thibaud? Yes it's simpler.. I don't know why the first time that I tested I found that it doesn't work.. its my mistake, sorry. Changed and tested, it seems to be ok now
(In reply to David Nind from comment #19) > Testing notes (using koha-testing-docker): > > - Tested using both a MARC21 and UNIMARC installation. > > - For a UNIMARC installation there is only one way to replace (both before > and after the patch is applied): > . Select Edit > Edit record > . Click on the 'Replace record via Z39.50/SRU search' button > => There is no option in the dropdown list to change like a MARC21 > installation (Edit > Replace record via Z39.50/SRU search) Oh ok, I see what you mean, but maybe this dropdown list is about another issue or enhancement and not directly on this BZ. Its my opinion but I can make a mistake, I'm just a newbie on Koha :)
(In reply to Thibaud Guillot from comment #23) > Oh ok, I see what you mean, but maybe this dropdown list is about another > issue or enhancement and not directly on this BZ. Its my opinion but I can > make a mistake, I'm just a newbie on Koha :) It was more just an observation, so not something that needs to be "fixed" if someone wants to.
Could not compile /kohadevbox/koha/cataloguing/z3950_auth_search.pl: Global symbol "$authobj" requires explicit package name (did you forget to declare "my $authobj"?) at /kohadevbox/koha/cataloguing/z3950_auth_search.pl line 39.
Also the C4::AuthoritiesMarc import is not longer needed.
Created attachment 132443 [details] [review] Bug 29173: Fixed pre-filling of the search form from the "Replace record with ZR39.50/SRU" (Authority page detail) Now this action has the same pre-filling behaviour as the "Edit" -> "Edit Record" -> "Replace Record via Z39.50/SRU Search" action. Author Personal - Author Meeting/Conf. - Uniform Title and Subject are filled in if the subfield contains data (like the "Edit->Replace" action). Unimarc and Marc21 specificities are supported. Test Plan : 1) You must have a Z39.50/SRU server for authorities 2) Go to an authority detail page (Author - Uniform title - Subject) 3) First go to "Edit"-> "Edit record" -> "Replace record via..." 4) See that form is prefilled with form data 5) Go back and now click on "Replace Record.." directly 6) See that form is also prefilled with data now
Created attachment 136410 [details] [review] Bug 29173: Fixed pre-filling of the search form from the "Replace record with ZR39.50/SRU" (Authority page detail) Now this action has the same pre-filling behaviour as the "Edit" -> "Edit Record" -> "Replace Record via Z39.50/SRU Search" action. Author Personal - Author Meeting/Conf. - Uniform Title and Subject are filled in if the subfield contains data (like the "Edit->Replace" action). Unimarc and Marc21 specificities are supported. Test Plan : 1) You must have a Z39.50/SRU server for authorities 2) Go to an authority detail page (Author - Uniform title - Subject) 3) First go to "Edit"-> "Edit record" -> "Replace record via..." 4) See that form is prefilled with form data 5) Go back and now click on "Replace Record.." directly 6) See that form is also prefilled with data now
Created attachment 136411 [details] [review] Bug 29173: Fixed pre-filling of the search form from the "Replace record with ZR39.50/SRU" (Authority page detail) Now this action has the same pre-filling behaviour as the "Edit" -> "Edit Record" -> "Replace Record via Z39.50/SRU Search" action. Author Personal - Author Meeting/Conf. - Uniform Title and Subject are filled in if the subfield contains data (like the "Edit->Replace" action). Unimarc and Marc21 specificities are supported. Test Plan : 1) You must have a Z39.50/SRU server for authorities 2) Go to an authority detail page (Author - Uniform title - Subject) 3) First go to "Edit"-> "Edit record" -> "Replace record via..." 4) See that form is prefilled with form data 5) Go back and now click on "Replace Record.." directly 6) See that form is also prefilled with data now
I'm getting this error after applying the patch: The method Koha::Authority->record is not covered by tests! Trace begun at /kohadevbox/koha/Koha/Object.pm line 875 Koha::Object::AUTOLOAD('Koha::Authority=HASH(0x55aa079a8cf0)') called at /kohadevbox/koha/cataloguing/z3950_auth_search.pl line 37 eval {...} at /kohadevbox/koha/cataloguing/z3950_auth_search.pl line 2 CGI::Compile::ROOT::kohadevbox_koha_cataloguing_z3950_auth_search_2epl::__ANON__('CGI::Compile=HASH(0x55aa07855ba0)', '', '/kohadevbox/koha/cataloguing/z3950_auth_search.pl', '/kohadevbox/koha/cataloguing', 'ARRAY(0x55aa07853d88)') called at /usr/share/perl5/CGI/Compile.pm line 151 CGI::Compile::ROOT::kohadevbox_koha_cataloguing_z3950_auth_search_2epl::z3950_auth_search_2epl at /usr/share/perl5/CGI/Emulate/PSGI.pm line 30 CGI::Emulate::PSGI::__ANON__('HASH(0x55aa07ea9998)') called at /usr/share/perl5/Plack/App/WrapCGI.pm line 95 Plack::App::WrapCGI::call('Plack::App::WrapCGI=HASH(0x55aa07884ad0)', 'HASH(0x55aa07ea9998)') called at /usr/share/perl5/Plack/Component.pm line 50 Plack::Component::__ANON__('HASH(0x55aa07ea9998)') called at /usr/share/perl5/Plack/App/CGIBin.pm line 50 Plack::App::CGIBin::serve_path('Plack::App::CGIBin=HASH(0x55a9fcf2d7b8)', 'HASH(0x55aa07ea9998)', '/kohadevbox/koha/cataloguing/z3950_auth_search.pl') called at /usr/share/perl5/Plack/App/File.pm line 34 Plack::App::File::call('Plack::App::CGIBin=HASH(0x55a9fcf2d7b8)', 'HASH(0x55aa07ea9998)') called at /usr/share/perl5/Plack/Component.pm line 50 Plack::Component::__ANON__('HASH(0x55aa07ea9998)') called at /usr/share/perl5/Plack/Middleware/LogWarn.pm line 22 Plack::Middleware::LogWarn::call('Plack::Middleware::LogWarn=HASH(0x55aa0666c2e0)', 'HASH(0x55aa07ea9998)') called at /usr/share/perl5/Plack/Component.pm line 50 Plack::Component::__ANON__('HASH(0x55aa07ea9998)') called at /usr/share/perl5/Plack/Middleware/Log4perl.pm line 30 Plack::Middleware::Log4perl::call('Plack::Middleware::Log4perl=HASH(0x55aa0666c670)', 'HASH(0x55aa07ea9998)') called at /usr/share/perl5/Plack/Component.pm line 50 Plack::Component::__ANON__('HASH(0x55aa07ea9998)') called at /usr/share/perl5/Plack/Middleware/HTTPExceptions.pm line 20 Plack::Middleware::HTTPExceptions::try {...} at /usr/share/perl5/Try/Tiny.pm line 100 .......
Created attachment 136440 [details] [review] Bug 29173: Fixed pre-filling of the search form from the "Replace record with ZR39.50/SRU" (Authority page detail) Now this action has the same pre-filling behaviour as the "Edit" -> "Edit Record" -> "Replace Record via Z39.50/SRU Search" action. Author Personal - Author Meeting/Conf. - Uniform Title and Subject are filled in if the subfield contains data (like the "Edit->Replace" action). Unimarc and Marc21 specificities are supported. Test Plan : 1) You must have a Z39.50/SRU server for authorities 2) Go to an authority detail page (Author - Uniform title - Subject) 3) First go to "Edit"-> "Edit record" -> "Replace record via..." 4) See that form is prefilled with form data 5) Go back and now click on "Replace Record.." directly 6) See that form is also prefilled with data now
(In reply to David Nind from comment #30) > I'm getting this error after applying the patch: > > The method Koha::Authority->record is not covered by tests! > > Trace begun at /kohadevbox/koha/Koha/Object.pm line 875 > Koha::Object::AUTOLOAD('Koha::Authority=HASH(0x55aa079a8cf0)') called at > /kohadevbox/koha/cataloguing/z3950_auth_search.pl line 37 > eval {...} at /kohadevbox/koha/cataloguing/z3950_auth_search.pl line 2 > CGI::Compile::ROOT::kohadevbox_koha_cataloguing_z3950_auth_search_2epl:: > __ANON__('CGI::Compile=HASH(0x55aa07855ba0)', '', > '/kohadevbox/koha/cataloguing/z3950_auth_search.pl', > '/kohadevbox/koha/cataloguing', 'ARRAY(0x55aa07853d88)') called at > /usr/share/perl5/CGI/Compile.pm line 151 > CGI::Compile::ROOT::kohadevbox_koha_cataloguing_z3950_auth_search_2epl:: > z3950_auth_search_2epl at /usr/share/perl5/CGI/Emulate/PSGI.pm line 30 > CGI::Emulate::PSGI::__ANON__('HASH(0x55aa07ea9998)') called at > /usr/share/perl5/Plack/App/WrapCGI.pm line 95 > Plack::App::WrapCGI::call('Plack::App::WrapCGI=HASH(0x55aa07884ad0)', > 'HASH(0x55aa07ea9998)') called at /usr/share/perl5/Plack/Component.pm line 50 > Plack::Component::__ANON__('HASH(0x55aa07ea9998)') called at > /usr/share/perl5/Plack/App/CGIBin.pm line 50 > Plack::App::CGIBin::serve_path('Plack::App::CGIBin=HASH(0x55a9fcf2d7b8)', > 'HASH(0x55aa07ea9998)', '/kohadevbox/koha/cataloguing/z3950_auth_search.pl') > called at /usr/share/perl5/Plack/App/File.pm line 34 > Plack::App::File::call('Plack::App::CGIBin=HASH(0x55a9fcf2d7b8)', > 'HASH(0x55aa07ea9998)') called at /usr/share/perl5/Plack/Component.pm line 50 > Plack::Component::__ANON__('HASH(0x55aa07ea9998)') called at > /usr/share/perl5/Plack/Middleware/LogWarn.pm line 22 > Plack::Middleware::LogWarn::call('Plack::Middleware:: > LogWarn=HASH(0x55aa0666c2e0)', 'HASH(0x55aa07ea9998)') called at > /usr/share/perl5/Plack/Component.pm line 50 > Plack::Component::__ANON__('HASH(0x55aa07ea9998)') called at > /usr/share/perl5/Plack/Middleware/Log4perl.pm line 30 > Plack::Middleware::Log4perl::call('Plack::Middleware:: > Log4perl=HASH(0x55aa0666c670)', 'HASH(0x55aa07ea9998)') called at > /usr/share/perl5/Plack/Component.pm line 50 > Plack::Component::__ANON__('HASH(0x55aa07ea9998)') called at > /usr/share/perl5/Plack/Middleware/HTTPExceptions.pm line 20 > Plack::Middleware::HTTPExceptions::try {...} at > /usr/share/perl5/Try/Tiny.pm line 100 > ....... Maybe I miss the rebase, can you test it now and tell me if you have the same issue ?
(In reply to Thibaud Guillot from comment #32) > Maybe I miss the rebase, can you test it now and tell me if you have the > same issue ? I still have the same issue. Testing using koha-testing-docker, current master, flush_memcached, restart_all, and cleared browser cache. For what it's worth: I was getting a similar error with some recalls related bugs, such as bug 30971.
I have the same issue as David (from a sandbox). The patch applies but the error happens when trying to replace authorities (even by the method that works without the patch)
Created attachment 144867 [details] [review] Bug 29173: Fixed pre-filling of the search form from the "Replace record with ZR39.50/SRU" (Authority page detail) Test Plan : 1) You must have a Z39.50/SRU server for authorities 2) Go to an authority detail page (Author - Uniform title - Subject) 3)After go to "Edit"-> "Edit record" -> "Replace record via..." or choose "Replace Record.." directly 4) See that form is also prefilled with data now
I change the logical this time, in a "easier" way ? With a direct mapping with data's fields and sufields.. I hope this work now for you :) I also changed my test plan cause now I had the same behavior when I click on "Edit" then "Replace with.." than directly choose 'Replace with.." I'm waiting your feedbacks, thanks
Hi I'm getting this error when trying to apply the patch: root@kohadevbox:koha(bz29173)$ git bz apply 29173 Bug 29173 - Button "replace authority record via Z39/50/SRU" doesn't pre-fill 144867 - Bug 29173: Fixed pre-filling of the search form from the "Replace record with ZR39.50/SRU" (Authority page detail) Apply? [(y)es, (n)o, (i)nteractive] y Applying: Bug 29173: Fixed pre-filling of the search form from the "Replace record with ZR39.50/SRU" (Authority page detail) error: sha1 information is lacking or useless (cataloguing/z3950_auth_search.pl). error: could not build fake ancestor Patch failed at 0001 Bug 29173: Fixed pre-filling of the search form from the "Replace record with ZR39.50/SRU" (Authority page detail) David
Created attachment 144972 [details] [review] Bug 29173: Fixed pre-filling of the search form from the "Replace record with ZR39.50/SRU" (Authority page detail) Now this action has the same pre-filling behaviour as the "Edit" -> "Edit Record" -> "Replace Record via Z39.50/SRU Search" action. Author Personal - Author Meeting/Conf. - Uniform Title and Subject are filled in if the subfield contains data (like the "Edit->Replace" action). Unimarc and Marc21 specificities are supported. Test Plan : 1) You must have a Z39.50/SRU server for authorities 2) Go to an authority detail page (Author - Uniform title - Subject) 3)After go to "Edit"-> "Edit record" -> "Replace record via..." or choose "Replace Record.." directly 4) See that form is also prefilled with data now
(In reply to David Nind from comment #37) > Hi > > I'm getting this error when trying to apply the patch: > > root@kohadevbox:koha(bz29173)$ git bz apply 29173 > > Bug 29173 - Button "replace authority record via Z39/50/SRU" doesn't pre-fill > > 144867 - Bug 29173: Fixed pre-filling of the search form from the "Replace > record with ZR39.50/SRU" (Authority page detail) > > Apply? [(y)es, (n)o, (i)nteractive] y > Applying: Bug 29173: Fixed pre-filling of the search form from the "Replace > record with ZR39.50/SRU" (Authority page detail) > error: sha1 information is lacking or useless > (cataloguing/z3950_auth_search.pl). > error: could not build fake ancestor > Patch failed at 0001 Bug 29173: Fixed pre-filling of the search form from > the "Replace record with ZR39.50/SRU" (Authority page detail) > > David Hi David, Thanks for your feedback :) and best wishes for 2023 by the way ;) I squash my last commit and I test it in kohadevbox, it seems ok to me, can you re-test it ?
(In reply to Thibaud Guillot from comment #39) > Thanks for your feedback :) and best wishes for 2023 by the way ;) > > I squash my last commit and I test it in kohadevbox, it seems ok to me, can > you re-test it ? Best wishes to you for 2023 as well! The patch now applies, I am now testing... David
Created attachment 144983 [details] [review] Bug 29173: Fixed pre-filling of the search form from the "Replace record with ZR39.50/SRU" (Authority page detail) Now this action has the same pre-filling behaviour as the "Edit" -> "Edit Record" -> "Replace Record via Z39.50/SRU Search" action. Author Personal - Author Meeting/Conf. - Uniform Title and Subject are filled in if the subfield contains data (like the "Edit->Replace" action). Unimarc and Marc21 specificities are supported. Test Plan : 1) You must have a Z39.50/SRU server for authorities 2) Go to an authority detail page (Author - Uniform title - Subject) 3)After go to "Edit"-> "Edit record" -> "Replace record via..." or choose "Replace Record.." directly 4) See that form is also prefilled with data now Signed-off-by: David Nind <david@davidnind.com>
It would be good if both pop up windows were the same size for the search. At the moment the pop up window is slightly narrower for Edit > Edit record > Replace record via Z39.40/SRU search. This causes the labels to be above the input fields, rather than nicely aligned to the left. I tried to work out where the window size is set, but had no luck... Maybe this should be on a separate bug.
Created attachment 146380 [details] [review] Bug 29173: Fixed pre-filling of the search form from the "Replace record with ZR39.50/SRU" (Authority page detail) Now this action has the same pre-filling behaviour as the "Edit" -> "Edit Record" -> "Replace Record via Z39.50/SRU Search" action. Author Personal - Author Meeting/Conf. - Uniform Title and Subject are filled in if the subfield contains data (like the "Edit->Replace" action). Unimarc and Marc21 specificities are supported. Test Plan : 1) You must have a Z39.50/SRU server for authorities 2) Go to an authority detail page (Author - Uniform title - Subject) 3)After go to "Edit"-> "Edit record" -> "Replace record via..." or choose "Replace Record.." directly 4) See that form is also prefilled with data now Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 146381 [details] [review] Bug 29173: (QA follow-up) Match pop-over sizes As suggested by David Nind, this patch updates the call to z3950 search on the authority edit page to match the sizing of the one from the details page. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This all works well and the QA script is happy. I would have loved to see some consistency in the implementation between the two buttons however.. At first I thought this approach made the most logical sense, at the controller level, but as I worked through the code to understand how it works on the edit page I concluded that I think that's the cleaner approach pre-populating the search fields using the data already on display in the page rather than having to query for it again in the search controller. Anyway.. I don't think that should hold this up.. but it might be nice to clean up as a follow-up bug. Passing QA, thanks Thibaud, and welcome!
(In reply to Martin Renvoize from comment #45) > This all works well and the QA script is happy. > > I would have loved to see some consistency in the implementation between the > two buttons however.. At first I thought this approach made the most > logical sense, at the controller level, but as I worked through the code to > understand how it works on the edit page I concluded that I think that's the > cleaner approach pre-populating the search fields using the data already on > display in the page rather than having to query for it again in the search > controller. > > Anyway.. I don't think that should hold this up.. but it might be nice to > clean up as a follow-up bug. > > Passing QA, thanks Thibaud, and welcome! Thanks to you Martin :)
Pushed to master for 23.05. Nice work everyone, thanks!
Nice work, thanks everyone! Pushed to 22.11.x for the next release.
Backported to 22.05.x for upcoming 22.05.10
applied to 21.11.x for 21.11.18
Not backported to 21.05.x
Please have a look at bug 33445 that is suggesting to revert these patches!
(In reply to Jonathan Druart from comment #52) > Please have a look at bug 33445 that is suggesting to revert these patches! ping Thibaud?
(In reply to Jonathan Druart from comment #53) > (In reply to Jonathan Druart from comment #52) > > Please have a look at bug 33445 that is suggesting to revert these patches! > > ping Thibaud? Hello Jonathan, Sorry for the delay, I saw and read the bug 33445 apparently other patches have been proposed to replace the revert. But I understand the problematic behavior of this one.. Do you think there is a need for me to do something?
(In reply to Thibaud Guillot from comment #54) > (In reply to Jonathan Druart from comment #53) > > (In reply to Jonathan Druart from comment #52) > > > Please have a look at bug 33445 that is suggesting to revert these patches! > > > > ping Thibaud? > > Hello Jonathan, > > Sorry for the delay, I saw and read the bug 33445 apparently other patches > have been proposed to replace the revert. But I understand the problematic > behavior of this one.. Do you think there is a need for me to do something? If you agree with the changes there it's all good. I hadn't noticed Nick submitted a new version of the patches!
ok great, thanks for the alert by the way