Bug 37061 - Allow to define what information is automatically transferred from biblio to a new component record
Summary: Allow to define what information is automatically transferred from biblio to ...
Status: Signed Off
Alias: None
Product: Koha
Classification: Unclassified
Component: Cataloging (show other bugs)
Version: 23.11
Hardware: All All
: P5 - low enhancement
Assignee: Johanna Räisä
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-06-10 12:37 UTC by Piia Semenoff
Modified: 2024-09-27 04:59 UTC (History)
3 users (show)

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


Attachments
Bug 37061: allow to configure how is data copied from host to component parts (10.67 KB, patch)
2024-06-12 10:27 UTC, Johanna Räisä
Details | Diff | Splinter Review
Bug 37061: allow to configure how is data copied from host to component parts (10.68 KB, patch)
2024-06-13 09:24 UTC, Johanna Räisä
Details | Diff | Splinter Review
Bug 37061: allow to configure how is data copied from host to component parts (10.71 KB, patch)
2024-09-26 18:08 UTC, Olivier Vezina
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Piia Semenoff 2024-06-10 12:37:38 UTC
The cataloguing of the music material is in accordance with the RDA. It would be nice to be able to define which information is automatically transferred from the biblio to its component record (more specifically to  773 fields) when you create a new component record.

It’s not possible to define through the staff interface what information is transferred from the biblio to the component record, because there is no system preference for these configurations. Fields are hard coded in Koha's source code. (C4\Biblio.pm, prepare_host_field).
 
The information should transfer from biblio to the component record like this:
001
 -> 773w

020$a
 -> 773z

022$a
 -> 773x

028$b
028$a
 -> 773o

245$a
245$b
245$n
245$p
245$c
 -> 773t

264$a
264$b
264$c
 -> 773d

300$a
300$e
 -> 773h

In this bug by component record I mean e.g. a song of a note or a song of an album. I'm not quite sure what is the right term to use in this case.
Comment 1 Johanna Räisä 2024-06-12 10:27:13 UTC
Created attachment 167648 [details] [review]
Bug 37061: allow to configure how is data copied from host to  component parts

This patch adds a new system preference to allow to configure how is data copied from host to component parts. The rules are defined in YAML format.
If left empty, the default behavior is to copy the host data to the component parts as hard coded in the code.

Test plan:
1) Apply the patch
2) Run updatedatabase.pl
3) Go to Administration -> Global system preferences
4) Search for PrepareHostField
5) Fill the rules in YAML format as in the example in the description
6) Save
7) Create a new child record
8) See that the data is copied from host to the component parts according to the rules

Sponsored-by: Koha-Suomi Oy
Comment 2 Johanna Räisä 2024-06-13 09:24:23 UTC
Created attachment 167683 [details] [review]
Bug 37061: allow to configure how is data copied from host to  component parts

This patch adds a new system preference to allow to configure how is data copied from host to component parts. The rules are defined in YAML format.
If left empty, the default behavior is to copy the host data to the component parts as hard coded in the code.

Test plan:
1) Apply the patch
2) Run updatedatabase.pl
3) Go to Administration -> Global system preferences
4) Search for PrepareHostField
5) Fill the rules in YAML format as in the example in the description
6) Save
7) Create a new child record
8) See that the data is copied from host to the component parts according to the rules

Sponsored-by: Koha-Suomi Oy
Comment 3 Olivier Vezina 2024-09-26 18:08:56 UTC
Created attachment 172001 [details] [review]
Bug 37061: allow to configure how is data copied from host to component parts

This patch adds a new system preference to allow to configure how is data copied from host to component parts. The rules are defined in YAML format.
If left empty, the default behavior is to copy the host data to the component parts as hard coded in the code.

Test plan:
1) Apply the patch
2) Run updatedatabase.pl
3) Go to Administration -> Global system preferences
4) Search for PrepareHostField
5) Fill the rules in YAML format as in the example in the description
6) Save
7) Create a new child record
8) See that the data is copied from host to the component parts according to the rules

Sponsored-by: Koha-Suomi Oy
Signed-off-by: Olivier V <olivier.vezina@inLibro.com>
Comment 4 Olivier Vezina 2024-09-26 18:15:57 UTC
Not sure if both of them needed to be signed off they seem pretty similar
Comment 5 Olivier Vezina 2024-09-26 18:17:18 UTC
But everything seem to be working with only the second one
Comment 6 Johanna Räisä 2024-09-27 04:59:46 UTC
(In reply to Olivier Vezina from comment #5)
> But everything seem to be working with only the second one

I probably have submitted the patch twice, since to me those are similar. I tried to look for a tool to removing the other patch but I couldn't find any.