Created attachment 7133 [details] screenshot From a biblio record, if one wants to add a 600$a information, a pop-up appears. On this new window, on search terms typed and validated, a table result is displayed, with a column "Get It!" allowing the selection of an authority. From here, different cases: 1) If we have a simple authority with 200$a and 200$b subfields, a link "choose" is displayed, working correctly. 2) If the authority has different occurences of 200$a/200$b, numeric links (1 2 and so on) are displayed, one for each occurence. In the example of my screenshot, the line with a "Paul, Korky -- Pauline, Korkette" summary possesses two links : "1" will add "Paul, Korky" whereas "2" will add "Pauline, Korkette" (couldn't come up with a better name ;)). 3) If the authority has 200$x or 200$y subfields defined, several links are also created, when it should not be the case. In our example, "Niclausse, Paul -- Expositions" will create a link "1" for "Niclausse, Paul" and a link "2" for "Expositions". Clicking on the 2nd link leads to the following error: Software error: Can't call method "subfields" on an undefined value at /home/asaurat/workspace/versions/community/authorities/blinddetail-biblio-search.pl line 86. Only the cases 1 and 2 should be handled. The creation of links for subfields like 200$x or 200$y should be removed.
Created attachment 7135 [details] [review] proposed patch
[MT8560] I tested with an UNIMARC db. Would it be also ok with MARC21 ? (the code about the biblio 600 field is not modified, only the authority 200$a and 200$b)
I think you need to wrap this in a check for the marcflavour and only do this if it is UNIMARC
(In reply to comment #3) > I think you need to wrap this in a check for the marcflavour and only do > this if it is UNIMARC Agreed. I don't think there is an analogous problem in MARC21, or, if there is, I have never seen it.
I did not succeed in testing, because searching an existing or just created authority brings no results. tested on Biblibre sandbox1
Created attachment 9410 [details] [review] proposed patch #2 Now with encapsulation for UNIMARC. I know little about the differences between the different formats so I separated the code almost totally, but if someone sees a way to refactor safely just tell me I'll make a new patch.
I tried testing this on sandbox2 - I had problems cataloguing a UNIMARC authority that would give me numbers to choose from in the auth finder. Can you perhaps attach some example records I could copy from?
Adrien, don't you think that this patch will break bug 4838?
SAUT UNIMARC authority has this summary: [200a][, 200b][(200g)][ 200d][ ; 200c][ (200f)][ -- 200x][ -- 200z][ -- 200y] Which drive the authority display. Have you tried modifying this summary, and replace '--' with '-'? I think it would fix the bug, and keep the repeated headings selection functionnality.
Created attachment 19776 [details] [review] Bug 7442 - Crash when selecting an authority with 200$x or 200$y I worked on a way to correct this bug and keeping the " -- " possible in authority summary. I've chosen to use " | " as multiple headings separator. If this must be configurable, I'll do so. See commit message.
Created attachment 19777 [details] [review] Bug 7442 - Follow up : Authorities search on all types does not show summary Followup for a small correcting in authorities search.
Created attachment 19778 [details] [review] [SIGNED-OFF] Bug 7442 - Crash when selecting an authority with 200$x or 200$y I can confirm the problem and the solution. I have tested the patch on a large DB with authorities having multiples headings. There is no regression on bug 4838
Created attachment 19779 [details] [review] [SIGNED-OFF] Bug 7442 - Follow up : Authorities search on all types does not show summary
I had problems last time to test this, because I was not able to create authorities in my UNIMARC installation. Could you please provide some instructions?
(In reply to Katrin Fischer from comment #14) > I had problems last time to test this, because I was not able to create > authorities in my UNIMARC installation. Could you please provide some > instructions? Does it not work with a UNIMARC sandbox ?
Hi Fridolyn, I have my own UNIMARC installation with the data from the sandbox. My problem is I need to create a test case to see if this works correctly and my cataloguing skills in UNIMARC are limited.
(In reply to Katrin Fischer from comment #16) Could you tell where you are stopped in test plan ?
Fridolyn, see comment 14 - I need instructions on how to correctly catalog a UNIMARC authority with the required fields to reproduce this problem.
(In reply to Katrin Fischer from comment #18) > Fridolyn, see comment 14 - I need instructions on how to correctly catalog a > UNIMARC authority with the required fields to reproduce this problem. Don't you have existing authorities ?
(In reply to Fridolyn SOMERS from comment #19) > (In reply to Katrin Fischer from comment #18) > > Fridolyn, see comment 14 - I need instructions on how to correctly catalog a > > UNIMARC authority with the required fields to reproduce this problem. > Don't you have existing authorities ? They don't use UNIMARC in Germany, so no.
(In reply to Katrin Fischer from comment #18) > Fridolyn, see comment 14 - I need instructions on how to correctly catalog a > UNIMARC authority with the required fields to reproduce this problem. > Test plan : > - Edit an authority type summary : for example subject (heading on 250) : summary "[250a][ -- 250x]" This authority type should exists as SNC (Sujet (nom commun), with : Summary = [250a][ -- 250x][ -- 250y][ -- 250z] [(250b)] Auth field copied = 250 > - Create an authority A1 with one heading and a subdivision : for example a subject : 250$a "History" 250$x "20th century" Create a new authority of type SNC : In existing field 250, set $a and $x 250 $a "History" $x "20th century" Only those two subfields matter. > - Create an authority A2 with several headings. for example a subject : 250$a "History" 250$a "Legends" Create a new authority of type SNC : In existing field 250, set $a 250 $a "History" Create a new field 250 and set $a 250 $a "Legends" Does it help ?
Created attachment 23152 [details] [review] [PASSED QA] Bug 7442 - Crash when selecting an authority with 200$x or 200$y From a biblio record, if one wants to add a 600$a information, a pop-up appears. On this new window, on search terms typed and validated, a table result is displayed, with a column "Get It!" allowing the selection of an authority. From here, different cases: 1) If we have a simple authority with 200$a and 200$b subfields, a link "choose" is displayed, working correctly. 2) If the authority has different occurences of 200$a/200$b, numeric links (1 2 and so on) are displayed, one for each occurence. In the example of my screenshot, the line with a "Paul, Korky -- Pauline, Korkette" summary possesses two links : "1" will add "Paul, Korky" whereas "2" will add "Pauline, Korkette" (couldn't come up with a better name ;)). 3) If the authority has 200$x or 200$y subfields defined, several links are also created, when it should not be the case. In our example, "Niclausse, Paul -- Expositions" will create a link "1" for "Niclausse, Paul" and a link "2" for "Expositions". Clicking on the 2nd link leads to the following error: Software error: Can't call method "subfields" on an undefined value at /home/asaurat/workspace/versions/community/authorities/blinddetail-biblio-search.pl line 86. Only the cases 1 and 2 should be handled. The creation of links for subfields like 200$x or 200$y should be removed. This problem is caused by the use of " -- " has separator of authorities with several headings, but also in some heading between main part and subdivisions. This patch corrects this by using an arry in authorities summary so that presentation is computed in template. I've choosen to use the pipe separator between authorities with several headings. This may be changed to be configurable. Test plan : - Edit an authority type summary : for example subject (heading on 250) : summary "[250a][ -- 250x]" - Create an authority A1 with one heading and a subdivision : for example a subject : 250$a "History" 250$x "20th century" - Create an authority A2 with several headings. for example a subject : 250$a "History" 250$a "Legends" - Rebuild Zebra queue - Go to OPAC and click on "Authority search" and search on "History" => You will find A1 and A2 : History -- 20th century History | Legends - Go to intranet autorities search and search on "History" => You will find A1 and A2 : History -- 20th century History | Legends - Edit a record using this autorities type as thesaurus : for example on 606$a - Click on thesaurus link and search on "History" => You will find A1 and A2 : History -- 20th century ; 0 times ; choose ; Edit authority History | Legends ; 0 times ; 1 2 ; Edit authority - Click on link "2" to chosse "Legends" => You get "Legends" in heading field : for example 606$a Signed-off-by: Frédéric Demians <f.demians@tamil.fr> I can confirm the problem and the solution. I have tested the patch on a large DB with authorities having multiples headings. There is no regression on bug 4838. Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Passes all tests and QA script. Without the patch I couldn't choose between multiple headings in the authority plugin, but with the patch it works as described.
Created attachment 23153 [details] [review] [PASSED QA] Bug 7442 - Follow up : Authorities search on all types does not show summary This patch corrects a small bug : Authorities search on all types does not show summary because it is computed with selected type (which is empty) instead of using found authority type. Test plan : - Go to intranet autorities search - Perform a search on all authorities types - Look at results => Without this patch, results rows do not display the autority summary, only authorized headings Signed-off-by: Frédéric Demians <f.demians@tamil.fr> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Hi Fridolin, thx for your hints - I think maybe using the SNC authority type was the missing piece.
Note: I couldn't reproduce the crash! But without the patches I can't pick between the 2 different headings, so I think this patch is still valid and needed.
(In reply to Katrin Fischer from comment #24) > Hi Fridolin, thx for your hints - I think maybe using the SNC authority type > was the missing piece. Your welcome, its a team work.
Pushed to master, along with a follow-up to apply the change to the Bootstrap theme and another follow-up to prevent a change in behavior for MARC21 authorities. Thanks, Fridolin!
Pushed to 3.14.x, will be in 3.14.12