Bug 40192 - Add additional fields to ERM titles
Summary: Add additional fields to ERM titles
Status: Passed QA
Alias: None
Product: Koha
Classification: Unclassified
Component: ERM (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Matt Blenkinsop
QA Contact: Martin Renvoize (ashimema)
URL:
Keywords:
Depends on: 38262 40191
Blocks: 38911 39438
  Show dependency treegraph
 
Reported: 2025-06-20 09:23 UTC by Katrin Fischer
Modified: 2025-11-04 15:21 UTC (History)
8 users (show)

See Also:
GIT URL:
Initiative type: ---
Sponsorship status: ---
Comma delimited list of Sponsors:
Crowdfunding goal: 0
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Bug 40192: Add additional fields to ERM titles (11.49 KB, patch)
2025-10-21 10:27 UTC, Matt Blenkinsop
Details | Diff | Splinter Review
Bug 40192: Add additional fields to ERM titles (11.87 KB, patch)
2025-10-23 15:15 UTC, Matt Blenkinsop
Details | Diff | Splinter Review
Bug 40192: Add additional fields to ERM titles (11.89 KB, patch)
2025-10-23 15:49 UTC, Biblibre Sandboxes
Details | Diff | Splinter Review
Bug 40192: Add additional fields to ERM titles (11.88 KB, patch)
2025-10-23 16:33 UTC, Matt Blenkinsop
Details | Diff | Splinter Review
Bug 40192: Add additional fields support to ERM titles (13.06 KB, patch)
2025-10-31 09:06 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 40192: Add additional fields support to ERM titles (13.06 KB, patch)
2025-11-04 15:21 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 40192: (bug 38446 follow-up) Add title to /erm/extended_attribute_types (2.46 KB, patch)
2025-11-04 15:21 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Katrin Fischer 2025-06-20 09:23:46 UTC
It would be great if there was an option to add additional fields to ERM titles. 

One use case would be adding mappings for KBART files as suggested by bug 38911.

KBART files from GoKB and other knowledge bases use the COUNTER "feature" of providing additional information and important identifiers as additional columns in KBART. Storing them in Koha would be very beneficial. But additional fields could also be used for a lot of others useful things.
Comment 1 Matt Blenkinsop 2025-10-21 10:27:02 UTC
Created attachment 188211 [details] [review]
Bug 40192: Add additional fields to ERM titles
Comment 2 Michaela Sieber 2025-10-21 11:35:32 UTC
does not work, neither in sandboxes, nor in ktd
Comment 3 Matt Blenkinsop 2025-10-23 15:15:36 UTC
Created attachment 188371 [details] [review]
Bug 40192: Add additional fields to ERM titles
Comment 4 Biblibre Sandboxes 2025-10-23 15:49:48 UTC
Created attachment 188374 [details] [review]
Bug 40192: Add additional fields to ERM titles

Signed-off-by: Michaela <michaela.sieber@kit.edu>
Comment 5 Matt Blenkinsop 2025-10-23 16:33:39 UTC
Created attachment 188378 [details] [review]
Bug 40192: Add additional fields to ERM titles
Comment 6 Martin Renvoize (ashimema) 2025-10-31 09:06:33 UTC
Created attachment 188777 [details] [review]
Bug 40192: Add additional fields support to ERM titles

This patch extends the additional fields framework to ERM e-holdings
titles, allowing libraries to configure custom metadata fields for
managing electronic resources.

Implementation details:
- Extended Koha::ERM::EHoldings::Title and ::Titles with
  AdditionalFields mixin for object-level support
- Added 'erm_titles' table mapping to AdditionalField.pm for API
  serialization
- Updated OpenAPI schema definitions to include extended_attributes
  in erm_eholdings_title.yaml and expose extended_attribute_types
  endpoint
- Enhanced REST API controller to handle additional fields in title
  creation/updates
- Updated admin interface to allow configuring additional fields for
  the 'title' table name
- Modified Vue.js EHoldingsLocalTitleResource component to display
  and manage custom fields

This enables institutions to track custom metadata (e.g., license
details, administrative notes, local identifiers) alongside standard
ERM title information.

Test plan:
1. Configure additional fields:
   - Go to Administration > Additional fields
   - Click "New field" and select table name "title"
   - Create a text field: Name="License notes", Searchable=Yes
   - Create an authorized value field: Name="Access level",
     AV category=LOC (or any available category)
   - Save both fields

2. Test with local ERM titles:
   - Navigate to E-resource management > Local titles
   - Create a new local title or edit an existing one
   - Verify the "Additional fields" section appears with your
     configured fields
   - Fill in "License notes" with test text
   - Select a value for "Access level"
   - Save the title

3. Verify persistence:
   - Reopen the title you just edited
   - Confirm both additional field values are displayed correctly
   - Edit one field value and save
   - Confirm the update persists

Signed-off-by: Michaela <michaela.sieber@kit.edu>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Comment 7 Jonathan Druart 2025-11-04 15:21:00 UTC
Created attachment 189019 [details] [review]
Bug 40192: Add additional fields support to ERM titles

This patch extends the additional fields framework to ERM e-holdings
titles, allowing libraries to configure custom metadata fields for
managing electronic resources.

Implementation details:
- Extended Koha::ERM::EHoldings::Title and ::Titles with
  AdditionalFields mixin for object-level support
- Added 'erm_titles' table mapping to AdditionalField.pm for API
  serialization
- Updated OpenAPI schema definitions to include extended_attributes
  in erm_eholdings_title.yaml and expose extended_attribute_types
  endpoint
- Enhanced REST API controller to handle additional fields in title
  creation/updates
- Updated admin interface to allow configuring additional fields for
  the 'title' table name
- Modified Vue.js EHoldingsLocalTitleResource component to display
  and manage custom fields

This enables institutions to track custom metadata (e.g., license
details, administrative notes, local identifiers) alongside standard
ERM title information.

Test plan:
1. Configure additional fields:
   - Go to Administration > Additional fields
   - Click "New field" and select table name "title"
   - Create a text field: Name="License notes", Searchable=Yes
   - Create an authorized value field: Name="Access level",
     AV category=LOC (or any available category)
   - Save both fields

2. Test with local ERM titles:
   - Navigate to E-resource management > Local titles
   - Create a new local title or edit an existing one
   - Verify the "Additional fields" section appears with your
     configured fields
   - Fill in "License notes" with test text
   - Select a value for "Access level"
   - Save the title

3. Verify persistence:
   - Reopen the title you just edited
   - Confirm both additional field values are displayed correctly
   - Edit one field value and save
   - Confirm the update persists

Signed-off-by: Michaela <michaela.sieber@kit.edu>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Comment 8 Jonathan Druart 2025-11-04 15:21:03 UTC
Created attachment 189020 [details] [review]
Bug 40192: (bug 38446 follow-up) Add title to /erm/extended_attribute_types

Sponsored-by: Karlsruhe Institute of Technology (KIT)