Bug 39874

Summary: Template error prevents authority merging
Product: Koha Reporter: Owen Leonard <oleonard>
Component: AuthenticationAssignee: Owen Leonard <oleonard>
Status: Pushed to main --- QA Contact: Martin Renvoize (ashimema) <martin.renvoize>
Severity: major    
Priority: P5 - low CC: david, dpavlin, jonathan.druart, martin.renvoize
Version: Main   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: Trivial patch Documentation contact:
Documentation submission: Text to go in the release notes:
This fixes merging authority records. It was not possible to merge authority records after bug 39325 (this only affects Koha 25.05/main).
Version(s) released in:
25.05.00
Circulation function:
Bug Depends on: 39325    
Bug Blocks: 25318    
Attachments: Bug 39874: Correct template variable name to fix authority merging
Bug 39874: Correct template variable name to fix authority merging
Bug 39874: Correct template variable name to fix authority merging

Description Owen Leonard 2025-05-12 11:29:46 UTC
Bug 39325 renamed the variable used inside of the FOREACH, but one of the instances was unchanged: 

                    [% FOREACH line IN result %]
                        <tr data-authid="[% result.authid | html %]">
Comment 1 Owen Leonard 2025-05-12 11:36:21 UTC
Created attachment 182261 [details] [review]
Bug 39874: Correct template variable name to fix authority merging

This patch correct a template variable name so that the authority record
ID is correctly included in the search results table markup.

To test, apply the patch and go to Authorities.

- Perform a search which will return more than one result.
- On one of the results, click Actions -> Merge.
- An message should appear at the top, "Merging with authority..." and
  the authority record ID should be shown in parentheses.
- Pick another record in the results list to merge, click Actions ->
  Merge.
- You should be redirected to the "Merging records" page, with the
  correct two records shown under "Merge reference."

Sponsored-by: Athens County Public Libraries
Comment 2 David Nind 2025-05-12 13:39:59 UTC
Created attachment 182275 [details] [review]
Bug 39874: Correct template variable name to fix authority merging

This patch correct a template variable name so that the authority record
ID is correctly included in the search results table markup.

To test, apply the patch and go to Authorities.

- Perform a search which will return more than one result.
- On one of the results, click Actions -> Merge.
- An message should appear at the top, "Merging with authority..." and
  the authority record ID should be shown in parentheses.
- Pick another record in the results list to merge, click Actions ->
  Merge.
- You should be redirected to the "Merging records" page, with the
  correct two records shown under "Merge reference."

Sponsored-by: Athens County Public Libraries
Signed-off-by: David Nind <david@davidnind.com>
Comment 3 David Nind 2025-05-12 13:42:51 UTC
Thanks Owen for fixing!
Comment 4 Martin Renvoize (ashimema) 2025-05-12 13:54:29 UTC
Created attachment 182278 [details] [review]
Bug 39874: Correct template variable name to fix authority merging

This patch correct a template variable name so that the authority record
ID is correctly included in the search results table markup.

To test, apply the patch and go to Authorities.

- Perform a search which will return more than one result.
- On one of the results, click Actions -> Merge.
- An message should appear at the top, "Merging with authority..." and
  the authority record ID should be shown in parentheses.
- Pick another record in the results list to merge, click Actions ->
  Merge.
- You should be redirected to the "Merging records" page, with the
  correct two records shown under "Merge reference."

Sponsored-by: Athens County Public Libraries
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Comment 5 Katrin Fischer 2025-05-12 16:32:53 UTC
Pushed for 25.05!

Well done everyone, thank you!