Bug 40112

Summary: Problem when adding an authority after perform Link authorities automatically in a bibliographic record
Product: Koha Reporter: Koha collecto <koha>
Component: MARC Authority data supportAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: koha
Version: 24.05   
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 Koha collecto 2025-06-10 17:40:04 UTC
There's a problem when adding an authority following perform Link authorities automatically in a bibliographic record. When we add a subject authority, if there is more than one general subdivision ($x), the second one is not transposed in the authority addition form. When added manually, it does not maintain the position it was assigned when added after registration. 

To test: 
1.Create a bibliographic record 
2.Enter a subject authority 650: $aHealth services $xReform $zQuebec (Province)         $xHistory 
3.Click on Link authorities automatically (No matching authority found)
4.Click on the small + to add an authority
5.In the add authority form, on field 150, it show's only these : $aHealth services $xReform $zQuebec (Province)
6.Add a $xHistory and position it after $zQuebec (Province)
7.Save

-->The authority will be displayed as follows: $aHealth services $xReform $xHistory $zQuebec (Province)
This is not the correct order. It should be displayed as follows: $aHealth Services $xReform $zQuebec (Province) $xHistory