Bug 39529

Summary: Incorrect relationship subfield for unimarc when linking authorities with other authorities
Product: Koha Reporter: Laurence Rault <laurence.rault>
Component: MARC Authority data supportAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low    
Version: Main   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: --- Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:

Description Laurence Rault 2025-04-02 15:16:34 UTC
At least from Koha 23.11, in UNIMARC database, when you choose an authority to link with another authority, and select one relationship in the auth_finder, the relation code is added in subfield w, as it is for MARC21.
For UNIMARC it should be subfield 5

Test Plan : 
0) [PREREQUISITES in order for the authority finder plugin to come up]
   a) database configured in UNIMARC
   b) In the SNC (or TOPIC_TERM) authority type
   c) View the MARC structure, click on 'Actions->Subfields' for tag 550; click on 'Edit subfields'.
      Select the subfield 'a' tab, then pick an auth type (it could be the same SNC or TOPIC_TERM) from the 'Thesaurus:' dropdown menu; click 'Save changes' at the top.
   d) In the 550 field, add the subfield w if it does not exists (only to be able to view the problem)

1) In the Staff client, go to Authorities, then click 'New Authority'
   and pick the 'SNC' (or TOPIC_TERM) authority type (or edit an existing auth).

2) When the authority editor comes up, go to tag 550 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 code of the relationship is added in subfield w. It should be subfield 5.

5bis) After a suitable patch will be applied : Notice that the code of the relationship is added in subfield 5