Created attachment 180049 [details] Screenshot of the Staff interface showing the problem While working on something unrelated (Bug 21453), I noticed that in the current main branch, when linking authorities with other authorities, if you select a relationship you no longer get the associated letter (i.e. the "relationship code") copied to the appropriate subfield. Rather, the whole description gets copied. So, if you select "g - Broader term" (in MARC21), the following value gets copied to subfield $w: g - Broader term Instead of the correct value, which is simply: g The attached screenshot is an example of what I'm referring to.
This comes from commit 1f6d58f523bcb420fe01bbc16ccd56d43ac07e7b (Bug 38714), which introduced changes to auth-finder-search.inc and in the process removed the "value=" attributes from the HTML <select> element responsible for selecting the relationship code between authorities (when linking authorities with authorities). The fix is trivial -- expect a patch soon ;-) P.S. Greetings from the Hackfest in Marseille!
Created attachment 180054 [details] [review] Bug 39501: add "value=" attributes to the HTML select element In the current main branch, when linking authorities with other authorities, if you select a relationship you no longer get the associated letter (i.e. the "relationship code") copied to the appropriate subfield. Rather, the whole description gets copied. This patch fixes that. Test plan: 0) [PREREQUISITES in order for the authority finder plugin to come up] a) You must have at least one authority type besides the 'Default'. b) View the MARC structure of the 'Default' auth type, then click on 'Actions->Subfields' for tag 500; click on 'Edit subfields'. Select the subfield 'a' tab, then pick an auth type from the 'Thesaurus:' dropdown menu; click 'Save changes' at the top. 1) In the Staff client, go to Authorities, then click 'New Authority' and pick the 'Default' authority type (or edit an existing auth). 2) When the authority editor comes up, go to tag 500 and expand it. 3) Click on the ellipsis (...) next to subfield $a. 4) When the authority finder comes up, search for an authority, pick a relator code from the 'Special relationship:' dropdown, and then click on the 'Choose' button for one of the authorities you found. 5) Notice that the whole description for the relationship you selected gets copied (instead of just the single letter relationship code). 6) Apply this patch. 7) Repeat steps 1-4. Notice that, this time, only the relationship code gets copied over.
Created attachment 180413 [details] [review] Bug 39501: add "value=" attributes to the HTML select element In the current main branch, when linking authorities with other authorities, if you select a relationship you no longer get the associated letter (i.e. the "relationship code") copied to the appropriate subfield. Rather, the whole description gets copied. This patch fixes that. Test plan: 0) [PREREQUISITES in order for the authority finder plugin to come up] a) You must have at least one authority type besides the 'Default'. b) View the MARC structure of the 'Default' auth type, then click on 'Actions->Subfields' for tag 500; click on 'Edit subfields'. Select the subfield 'a' tab, then pick an auth type from the 'Thesaurus:' dropdown menu; click 'Save changes' at the top. 1) In the Staff client, go to Authorities, then click 'New Authority' and pick the 'Default' authority type (or edit an existing auth). 2) When the authority editor comes up, go to tag 500 and expand it. 3) Click on the ellipsis (...) next to subfield $a. 4) When the authority finder comes up, search for an authority, pick a relator code from the 'Special relationship:' dropdown, and then click on the 'Choose' button for one of the authorities you found. 5) Notice that the whole description for the relationship you selected gets copied (instead of just the single letter relationship code). 6) Apply this patch. 7) Repeat steps 1-4. Notice that, this time, only the relationship code gets copied over. Signed-off-by: Laurence <laurence.rault@biblibre.com>
The functionality is working as expected
Created attachment 181193 [details] [review] Bug 39501: add "value=" attributes to the HTML select element In the current main branch, when linking authorities with other authorities, if you select a relationship you no longer get the associated letter (i.e. the "relationship code") copied to the appropriate subfield. Rather, the whole description gets copied. This patch fixes that. Test plan: 0) [PREREQUISITES in order for the authority finder plugin to come up] a) You must have at least one authority type besides the 'Default'. b) View the MARC structure of the 'Default' auth type, then click on 'Actions->Subfields' for tag 500; click on 'Edit subfields'. Select the subfield 'a' tab, then pick an auth type from the 'Thesaurus:' dropdown menu; click 'Save changes' at the top. 1) In the Staff client, go to Authorities, then click 'New Authority' and pick the 'Default' authority type (or edit an existing auth). 2) When the authority editor comes up, go to tag 500 and expand it. 3) Click on the ellipsis (...) next to subfield $a. 4) When the authority finder comes up, search for an authority, pick a relator code from the 'Special relationship:' dropdown, and then click on the 'Choose' button for one of the authorities you found. 5) Notice that the whole description for the relationship you selected gets copied (instead of just the single letter relationship code). 6) Apply this patch. 7) Repeat steps 1-4. Notice that, this time, only the relationship code gets copied over. Signed-off-by: Laurence <laurence.rault@biblibre.com> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Pushed for 25.05! Well done everyone, thank you!