Bug 36515

Summary: Amend MARC modification templates so control fields can be copied to subfields
Product: Koha Reporter: Alex Buckley <alexbuckley>
Component: CatalogingAssignee: Alex Buckley <alexbuckley>
Status: Needs documenting --- QA Contact: Kyle M Hall (khall) <kyle>
Severity: enhancement    
Priority: P5 - low CC: lucas, m.de.rooy, martin.renvoize
Version: MainKeywords: release-notes-needed
Hardware: All   
OS: All   
Change sponsored?: Sponsored Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
24.11.00
Circulation function:
Attachments: Bug 36515: Amend MARC modification templates so control fields can be copied to subfields
Bug 36515: Amend MARC modification templates so control fields can be copied to subfields
Bug 36515: Amend MARC modification templates so control fields can be copied to subfields
Bug 36515: Add unit tests
Bug 36515: Amend MARC modification templates so control fields can be copied to subfields
Bug 36515: Add unit tests
Bug 36515: Add unit tests
Bug 36515: (QA follow-up) Tidy code

Description Alex Buckley 2024-04-04 03:41:25 UTC
It would be nice if MARC modification templates could work with control fields - specifically to copy control fields to subfields. 

A MARC control field is a field where the tag is less than 10, e.g. 001.
Comment 1 Alex Buckley 2024-04-10 03:36:16 UTC
Created attachment 164575 [details] [review]
Bug 36515: Amend MARC modification templates so control fields can be copied to subfields

Test plan:
1. Apply patch and restart services
2. Create a MARC modification template to move 001 to 099$a
3. Perform a Batch record modification using your MARC modification template from #1
4. Confirm that the template has successfully moved the 001 control field value to the 099$a subfield

Sponsored-by: Education Services Australia SCIS
Comment 2 Alex Buckley 2024-04-30 18:09:54 UTC
Created attachment 165924 [details] [review]
Bug 36515: Amend MARC modification templates so control fields can be copied to subfields

Test plan:
1. Apply patch and restart services
2. Create a MARC modification template with the action:
 Copy and replace field 001 to 099$a unless 099$a exists
3. Perform a Batch record modification using your MARC modification template from #2
4. Confirm that the template has successfully moved the 001 control field value to the 099$a subfield

Sponsored-by: Education Services Australia SCIS
Comment 3 Alex Buckley 2024-04-30 19:08:55 UTC
Created attachment 165928 [details] [review]
Bug 36515: Amend MARC modification templates so control fields can be copied to subfields

Test plan:
1. Apply patch and restart services
2. Create a MARC modification template with the action:
 Copy and replace field 001 to 099$a unless 099$a exists
3. Perform a Batch record modification using your MARC modification template from #2
4. Confirm that the template has successfully moved the 001 control field value to the 099$a subfield

Sponsored-by: Education Services Australia SCIS
Comment 4 Alex Buckley 2024-04-30 19:09:14 UTC
Created attachment 165929 [details] [review]
Bug 36515: Add unit tests

Test plan:
1. Run unit tests
ktd --shell
prove t/SimpleMARC.t

Sponsored-by: Education Services Australia SCIS
Comment 5 Alex Buckley 2024-04-30 19:10:12 UTC
Ready for testing.
Comment 6 David Nind 2024-05-02 00:19:41 UTC
Created attachment 166026 [details] [review]
Bug 36515: Amend MARC modification templates so control fields can be copied to subfields

Test plan:
1. Apply patch and restart services
2. Create a MARC modification template with the action:
 Copy and replace field 001 to 099$a unless 099$a exists
3. Perform a Batch record modification using your MARC modification template from #2
4. Confirm that the template has successfully moved the 001 control field value to the 099$a subfield

Sponsored-by: Education Services Australia SCIS
Signed-off-by: David Nind <david@davidnind.com>
Comment 7 David Nind 2024-05-02 00:19:43 UTC
Created attachment 166027 [details] [review]
Bug 36515: Add unit tests

Test plan:
1. Run unit tests
ktd --shell
prove t/SimpleMARC.t

Sponsored-by: Education Services Australia SCIS
Signed-off-by: David Nind <david@davidnind.com>
Comment 8 Alex Buckley 2024-05-02 12:43:46 UTC
Thanks for testing David!
Comment 9 Kyle M Hall (khall) 2024-07-19 13:00:08 UTC
Created attachment 169215 [details] [review]
Bug 36515: Add unit tests

Test plan:
1. Run unit tests
ktd --shell
prove t/SimpleMARC.t

Sponsored-by: Education Services Australia SCIS
Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 10 Kyle M Hall (khall) 2024-07-19 13:00:16 UTC
Created attachment 169216 [details] [review]
Bug 36515: (QA follow-up) Tidy code

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 11 Katrin Fischer 2024-08-02 16:05:32 UTC
It looks like something happened here and one of the patches was obsoleted. Trying to fix.
Comment 12 Katrin Fischer 2024-08-02 17:01:20 UTC
Pushed for 24.11!

Well done everyone, thank you!
Comment 13 Lucas Gass (lukeg) 2024-09-11 16:09:09 UTC
Enhancement will not be included in 24.05.x