Bug 35471 - Automatically select child MARC framework when adding child records
Summary: Automatically select child MARC framework when adding child records
Status: Patch doesn't apply
Alias: None
Product: Koha
Classification: Unclassified
Component: Cataloging (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Lari Taskula
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-12-01 22:41 UTC by Lari Taskula
Modified: 2024-04-18 12:06 UTC (History)
3 users (show)

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


Attachments
Bug 35471: Add column parent_frameworkcode to table biblio_framework (1.47 KB, patch)
2023-12-01 23:07 UTC, Lari Taskula
Details | Diff | Splinter Review
Bug 35471: DBIx changes (2.46 KB, patch)
2023-12-01 23:07 UTC, Lari Taskula
Details | Diff | Splinter Review
Bug 35471: Add support for selecting parent framework on MARC framework modification screen (4.21 KB, patch)
2023-12-01 23:07 UTC, Lari Taskula
Details | Diff | Splinter Review
Bug 35471: List child frameworks on MARC modification screen (2.44 KB, patch)
2023-12-01 23:07 UTC, Lari Taskula
Details | Diff | Splinter Review
Bug 35471: List parent frameworks on MARC framework list screen (1.48 KB, patch)
2023-12-01 23:07 UTC, Lari Taskula
Details | Diff | Splinter Review
Bug 35471: Add Koha::Template::Plugin::Frameworks->GetChildren() (4.39 KB, patch)
2023-12-01 23:07 UTC, Lari Taskula
Details | Diff | Splinter Review
Bug 35471: Add child frameworks to cataloguing toolbar's new child record button (2.53 KB, patch)
2023-12-01 23:07 UTC, Lari Taskula
Details | Diff | Splinter Review
Bug 35471: Add child frameworks to cataloguing toolbar's new child record button (2.52 KB, patch)
2023-12-01 23:14 UTC, Lari Taskula
Details | Diff | Splinter Review
Bug 35471: Add column parent_frameworkcode to table biblio_framework (1.49 KB, patch)
2023-12-01 23:16 UTC, Lari Taskula
Details | Diff | Splinter Review
Bug 35471: DBIx changes (2.46 KB, patch)
2023-12-01 23:16 UTC, Lari Taskula
Details | Diff | Splinter Review
Bug 35471: Add support for selecting parent framework on MARC framework modification screen (4.21 KB, patch)
2023-12-01 23:16 UTC, Lari Taskula
Details | Diff | Splinter Review
Bug 35471: List child frameworks on MARC modification screen (2.44 KB, patch)
2023-12-01 23:16 UTC, Lari Taskula
Details | Diff | Splinter Review
Bug 35471: List parent frameworks on MARC framework list screen (1.48 KB, patch)
2023-12-01 23:16 UTC, Lari Taskula
Details | Diff | Splinter Review
Bug 35471: Add Koha::Template::Plugin::Frameworks->GetChildren() (4.39 KB, patch)
2023-12-01 23:16 UTC, Lari Taskula
Details | Diff | Splinter Review
Bug 35471: Add child frameworks to cataloguing toolbar's new child record button (2.52 KB, patch)
2023-12-01 23:16 UTC, Lari Taskula
Details | Diff | Splinter Review
Bug 35471: Add column parent_frameworkcode to table biblio_framework (1.52 KB, patch)
2023-12-05 00:58 UTC, Lari Taskula
Details | Diff | Splinter Review
Bug 35471: DBIx changes (2.51 KB, patch)
2023-12-05 00:58 UTC, Lari Taskula
Details | Diff | Splinter Review
Bug 35471: Add support for selecting parent framework on MARC framework modification screen (4.42 KB, patch)
2023-12-05 00:58 UTC, Lari Taskula
Details | Diff | Splinter Review
Bug 35471: List child frameworks on MARC modification screen (2.44 KB, patch)
2023-12-05 00:58 UTC, Lari Taskula
Details | Diff | Splinter Review
Bug 35471: List parent frameworks on MARC framework list screen (1.48 KB, patch)
2023-12-05 00:58 UTC, Lari Taskula
Details | Diff | Splinter Review
Bug 35471: Add Koha::Template::Plugin::Frameworks->GetChildren() (4.39 KB, patch)
2023-12-05 00:58 UTC, Lari Taskula
Details | Diff | Splinter Review
Bug 35471: Add child frameworks to cataloguing toolbar's new child record button (2.54 KB, patch)
2023-12-05 00:59 UTC, Lari Taskula
Details | Diff | Splinter Review
Bug 35471: Add child frameworks to cataloguing toolbar's new child record button (2.69 KB, patch)
2023-12-15 11:56 UTC, PTFS Europe Sandboxes
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Lari Taskula 2023-12-01 22:41:12 UTC
Some libraries create their own MARC frameworks for component/child records. When adding a child record through host record, Koha currently selects the default MARC framework and a librarian must manually change to the child record framework.

This Bug adds a parent-child relationship to MARC frameworks and aims to skip the manual step of selecting child record framework.

The goal is to automatically select child MARC framework when adding child record through the host record.

To reproduce problem:
Administration -> MARC bibliographic framework
1. Create framework with frameworkcode "A"
2. Create framework with frameworkcode "A-child"

Record view
1. Save record with framework "A"
2. Navigate to a record
3. Click "+ New", a drop-down opens
4. Click "New child record"
5. After add biblio form opens, click "Settings"
6. Observe default framework selected
7. You must manually select "A-child framework"

After this change,
To test:
Administration -> MARC bibliographic framework
1. Create framework with frameworkcode "A"
2. Create framework with frameworkcode "A-child"
3. Set "A" as "A-child" 's parent framework

Record view
1. Save record with framework "A"
2. Navigate to a record
3. Click "+ New", a drop-down opens
4. Click "New child record"
5. After add biblio form opens, click "Settings"
6. Observe "A-child" framework automatically selected
Comment 1 Lari Taskula 2023-12-01 23:07:23 UTC Comment hidden (obsolete)
Comment 2 Lari Taskula 2023-12-01 23:07:26 UTC Comment hidden (obsolete)
Comment 3 Lari Taskula 2023-12-01 23:07:28 UTC Comment hidden (obsolete)
Comment 4 Lari Taskula 2023-12-01 23:07:30 UTC Comment hidden (obsolete)
Comment 5 Lari Taskula 2023-12-01 23:07:33 UTC Comment hidden (obsolete)
Comment 6 Lari Taskula 2023-12-01 23:07:35 UTC Comment hidden (obsolete)
Comment 7 Lari Taskula 2023-12-01 23:07:37 UTC Comment hidden (obsolete)
Comment 8 Lari Taskula 2023-12-01 23:14:08 UTC Comment hidden (obsolete)
Comment 9 Lari Taskula 2023-12-01 23:16:09 UTC Comment hidden (obsolete)
Comment 10 Lari Taskula 2023-12-01 23:16:11 UTC Comment hidden (obsolete)
Comment 11 Lari Taskula 2023-12-01 23:16:13 UTC Comment hidden (obsolete)
Comment 12 Lari Taskula 2023-12-01 23:16:16 UTC Comment hidden (obsolete)
Comment 13 Lari Taskula 2023-12-01 23:16:18 UTC Comment hidden (obsolete)
Comment 14 Lari Taskula 2023-12-01 23:16:21 UTC Comment hidden (obsolete)
Comment 15 Lari Taskula 2023-12-01 23:16:23 UTC Comment hidden (obsolete)
Comment 16 Lari Taskula 2023-12-05 00:58:45 UTC
Created attachment 159567 [details] [review]
Bug 35471: Add column parent_frameworkcode to table biblio_framework

Sponsored-by: Hypernova Oy
Comment 17 Lari Taskula 2023-12-05 00:58:48 UTC
Created attachment 159568 [details] [review]
Bug 35471: DBIx changes

Sponsored-by: Hypernova Oy
Comment 18 Lari Taskula 2023-12-05 00:58:50 UTC
Created attachment 159569 [details] [review]
Bug 35471: Add support for selecting parent framework on MARC framework modification screen

To test:
1. Navigate to Administration -> MARC bibliographic framework
2. Create MARC framework with frameworkcode "A"
3. Observe new field "Parent framework" when adding a new framework
4. After adding the framework, click Actions -> MARC structure
5. Select "Create framework for A" using "Default", click OK
6. Navigate back to frameworks listing
7. Create framework with frameworkcode "A-1"
8. Select framework you created at step 2 as the parent framework
9. After adding the framework, click Actions -> MARC structure
10. Select "Create framework for A-1" using "Default", click OK

Sponsored-by: Hypernova Oy
Comment 19 Lari Taskula 2023-12-05 00:58:53 UTC
Created attachment 159570 [details] [review]
Bug 35471: List child frameworks on MARC modification screen

1. Navigate to Administration -> MARC bibliographic framework
2. Select the parent framework you added in previous patch
3. Observe child framework being listed

Sponsored-by: Hypernova Oy
Comment 20 Lari Taskula 2023-12-05 00:58:55 UTC
Created attachment 159571 [details] [review]
Bug 35471: List parent frameworks on MARC framework list screen

1. Navigate to Administration -> MARC bibliographic framework
2. Observe new column "Parent framework"
3. Observe parent framework being populated for the child framework
   you added in previous patch

Sponsored-by: Hypernova Oy
Comment 21 Lari Taskula 2023-12-05 00:58:57 UTC
Created attachment 159572 [details] [review]
Bug 35471: Add Koha::Template::Plugin::Frameworks->GetChildren()

To test:
1. prove t/db_dependent/Koha/Template/Plugin/Frameworks.t

Sponsored-by: Hypernova Oy
Comment 22 Lari Taskula 2023-12-05 00:59:00 UTC
Created attachment 159573 [details] [review]
Bug 35471: Add child frameworks to cataloguing toolbar's new child record button

To test:
Administration -> MARC bibliographic framework
1. Create framework with frameworkcode "A"
2. Create framework with frameworkcode "A-1"
3. Set "A" as "A-1" 's parent framework

Record view
1. Save record with framework "A"
2. Navigate to a record
3. Click "+ New", a drop-down opens
4. Click "New child record"
5. After add biblio form opens, click "Settings"
6. Observe "A-1" framework automatically selected

Sponsored-by: Hypernova Oy
Comment 23 Lari Taskula 2023-12-05 01:07:04 UTC
I know qa-tools is complaining about tidiness, I tried my best fixing the issues but eventually had to give up as I'm not able to resolve them.

KomodoIDE/perltidy v20230912/perltidy command line arguments: -pro=/kohapath/.perltidyrc , Code -> Format -> Selection using perltidy

How do I know which lines are less tidy exactly? Can koha-qa tell me that?
Comment 24 PTFS Europe Sandboxes 2023-12-15 11:56:24 UTC
Created attachment 159884 [details] [review]
Bug 35471: Add child frameworks to cataloguing toolbar's new child record button

To test:
Administration -> MARC bibliographic framework
1. Create framework with frameworkcode "A"
2. Create framework with frameworkcode "A-1"
3. Set "A" as "A-1" 's parent framework

Record view
1. Save record with framework "A"
2. Navigate to a record
3. Click "+ New", a drop-down opens
4. Click "New child record"
5. After add biblio form opens, click "Settings"
6. Observe "A-1" framework automatically selected

Sponsored-by: Hypernova Oy
Signed-off-by: Päivi Knuutinen <paivi.knuutinen@joensuu.fi>
Comment 25 Päivi Knuutinen 2023-12-15 12:07:46 UTC
I tested this at sandbox and it works.