Bug 33231 - (Bug 30813 follow-up) No publication date nor edition statements in Z39.50 biblio search results
Summary: (Bug 30813 follow-up) No publication date nor edition statements in Z39.50 bi...
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Z39.50 / SRU / OpenSearch Servers (show other bugs)
Version: Main
Hardware: All All
: P3 trivial (vote)
Assignee: Janusz Kaczmarek
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-03-14 21:27 UTC by Janusz Kaczmarek
Modified: 2023-12-28 20:43 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
23.05.00,22.11.05


Attachments
Bug 33231 (Bug 30813 follow-up) No publication date in Z39.50 biblio search results (2.04 KB, patch)
2023-03-14 21:39 UTC, Janusz Kaczmarek
Details | Diff | Splinter Review
Bug 33231 (Bug 30813 follow-up) No publication date nor edition statements in Z39.50 biblio search results (3.53 KB, patch)
2023-03-14 22:50 UTC, Janusz Kaczmarek
Details | Diff | Splinter Review
Bug 33231 (Bug 30813 follow-up) No publication date nor edition statements in Z39.50 biblio search results (3.57 KB, patch)
2023-04-04 21:50 UTC, David Nind
Details | Diff | Splinter Review
Bug 33231: (Bug 30813 follow-up) No publication date nor edition statements in Z39.50 biblio search results (3.63 KB, patch)
2023-04-13 16:30 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 33231: (QA follow-up) Simplify conditional for date display (1.72 KB, patch)
2023-04-13 16:30 UTC, Nick Clemens
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Janusz Kaczmarek 2023-03-14 21:27:29 UTC
After executing Z39.50 search, the result table is not populated with publication dates.  This is the result of code refactoring made by Bug 30813.  The removed function _add_rowdata treated in special way the publication date putting it in $row in under special, non MARC variant dependent key 'date'--since the z3950_search.tt looks under breeding_loo.date.  But now the $row->{date} is not defined.

A patch will follow.
Comment 1 Janusz Kaczmarek 2023-03-14 21:39:39 UTC
Created attachment 148195 [details] [review]
Bug 33231 (Bug 30813 follow-up) No publication date in Z39.50 biblio search results

After executing Z39.50 search, the result table is not populated
with publication dates.  This is the result of code refactoring
made by Bug 30813.  The removed function _add_rowdata treated
in special way the publication date putting it in $row in under
special, non MARC variant dependent key 'date'--since
the z3950_search.tt looks under breeding_loo.date.

Test plan:
=========
1. Have a Koha instance with some Z39.50 servers defined.
2. In Cataloging, perform a Z39.50 search for any term.
3. In the result table you would not get the publication dates.
4. Apply the patch.
5. Repeat the search.
6. You should see the publication dates (according to the current
   mapping, i.e. for MARC 21 coming from 260 $c or 264 $c subfield).
Comment 2 Janusz Kaczmarek 2023-03-14 22:50:05 UTC
Created attachment 148196 [details] [review]
Bug 33231 (Bug 30813 follow-up) No publication date nor edition statements in Z39.50 biblio search results

After executing Z39.50 search, the result table is not populated
with publication dates.  This is the result of code refactoring
made by Bug 30813.  The removed function _add_rowdata treated
in special way the publication date putting it in $row in under
special, non MARC variant dependent key 'date'--since
the z3950_search.tt looks under breeding_loo.date.

Same effect (no data in the result table) with edition statement.
Reason: editionstatement coming from TransformMarcToKoha vs edition
expected by z3950_search.tt.

Test plan:
==========
1. Have a Koha instance with some Z39.50 servers defined.
2. In Cataloging, perform a Z39.50 search for any term.
3. In the result table you would not get the publication dates nor
   edition statement (if present in the record).
4. Apply the patch.
5. Repeat the search.
6. You should see the publication dates (according to the current
   mapping, i.e. for MARC 21 coming from 260 $c or 264 $c subfield)
   and edition statements from the records found.
Comment 3 David Nind 2023-04-04 21:50:11 UTC
Created attachment 149142 [details] [review]
Bug 33231 (Bug 30813 follow-up) No publication date nor edition statements in Z39.50 biblio search results

After executing Z39.50 search, the result table is not populated
with publication dates.  This is the result of code refactoring
made by Bug 30813.  The removed function _add_rowdata treated
in special way the publication date putting it in $row in under
special, non MARC variant dependent key 'date'--since
the z3950_search.tt looks under breeding_loo.date.

Same effect (no data in the result table) with edition statement.
Reason: editionstatement coming from TransformMarcToKoha vs edition
expected by z3950_search.tt.

Test plan:
==========
1. Have a Koha instance with some Z39.50 servers defined.
2. In Cataloging, perform a Z39.50 search for any term.
3. In the result table you would not get the publication dates nor
   edition statement (if present in the record).
4. Apply the patch.
5. Repeat the search.
6. You should see the publication dates (according to the current
   mapping, i.e. for MARC 21 coming from 260 $c or 264 $c subfield)
   and edition statements from the records found.

Signed-off-by: David Nind <david@davidnind.com>
Comment 4 David Nind 2023-04-04 21:51:14 UTC
Testing notes (using KTD):

1. Searching for the title "Perl best practices" returns a result with the publication year and an edition statement.
Comment 5 Nick Clemens 2023-04-13 16:30:31 UTC
Created attachment 149612 [details] [review]
Bug 33231: (Bug 30813 follow-up) No publication date nor edition statements in Z39.50 biblio search results

After executing Z39.50 search, the result table is not populated
with publication dates.  This is the result of code refactoring
made by Bug 30813.  The removed function _add_rowdata treated
in special way the publication date putting it in $row in under
special, non MARC variant dependent key 'date'--since
the z3950_search.tt looks under breeding_loo.date.

Same effect (no data in the result table) with edition statement.
Reason: editionstatement coming from TransformMarcToKoha vs edition
expected by z3950_search.tt.

Test plan:
==========
1. Have a Koha instance with some Z39.50 servers defined.
2. In Cataloging, perform a Z39.50 search for any term.
3. In the result table you would not get the publication dates nor
   edition statement (if present in the record).
4. Apply the patch.
5. Repeat the search.
6. You should see the publication dates (according to the current
   mapping, i.e. for MARC 21 coming from 260 $c or 264 $c subfield)
   and edition statements from the records found.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 6 Nick Clemens 2023-04-13 16:30:33 UTC
Created attachment 149613 [details] [review]
Bug 33231: (QA follow-up) Simplify conditional for date display

This patch simply checks if we have a value for copyrighydate and
displays publicationyear if not. Even if copyrightdate is requested (MARC21)
but isn't populated, the publicatoinyear won't replace it because we
haven't transformed that field.

I think this read a bit easier, but RM can weigh in

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 7 Katrin Fischer 2023-04-13 20:16:23 UTC
Fast moving patch, I like it :)
Comment 8 Tomás Cohen Arazi 2023-04-14 14:36:20 UTC
Pushed to master for 23.05.

Nice work everyone, thanks!
Comment 9 Matt Blenkinsop 2023-04-18 12:19:59 UTC
Nice work everyone!

Pushed to stable for 22.11.x
Comment 10 Lucas Gass 2023-05-05 22:25:00 UTC
Missing 22.05.x dependencies. NO backport.