Bug 39438 - Add additional fields to agreements periods
Summary: Add additional fields to agreements periods
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: 40192
Blocks:
  Show dependency treegraph
 
Reported: 2025-03-24 17:45 UTC by Mathieu Saby
Modified: 2025-11-04 15:21 UTC (History)
7 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 39438: Add additional fields to agreement periods (16.62 KB, patch)
2025-10-23 08:15 UTC, Matt Blenkinsop
Details | Diff | Splinter Review
Bug 39438: Add additional fields support to ERM agreement periods (14.26 KB, patch)
2025-10-31 09:20 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 39438: Add DBIC schema relationships for agreement period additional fields (2.24 KB, patch)
2025-10-31 09:20 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 39438: Add additional fields support to ERM agreement periods (14.26 KB, patch)
2025-11-04 15:21 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 39438: Add DBIC schema relationships for agreement period additional fields (2.24 KB, patch)
2025-11-04 15:21 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 39438: (bug 38446 follow-up) Add agreement_period to /erm/extended_attribute_types (2.56 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 Mathieu Saby 2025-03-24 17:45:51 UTC
It could be discussed... But it would probably be useful to give this possiblity to libraries
Comment 1 Matt Blenkinsop 2025-10-23 08:15:01 UTC
Created attachment 188307 [details] [review]
Bug 39438: Add additional fields to agreement periods
Comment 2 Martin Renvoize (ashimema) 2025-10-31 09:20:10 UTC
Created attachment 188778 [details] [review]
Bug 39438: Add additional fields support to ERM agreement periods

This patch enables additional fields functionality for agreement periods
in the ERM (Electronic Resource Management) module, allowing libraries
to define custom metadata fields for agreement period records.

Changes include:
- Update Koha::AdditionalField to support erm_agreement_periods table
- Modify API definitions to include extended_attributes in responses
- Add erm_agreement_periods option to additional fields admin interface
- Enhance Vue components to display and manage additional field values
- Update ShowElement component to handle period-specific attributes

Test plan:
1. Navigate to Administration > Additional fields
2. Create new fields for "Agreement periods"
3. Edit an ERM agreement and add/edit period information
4. Verify additional fields appear and can be populated
5. Confirm values are saved and displayed correctly

Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Comment 3 Martin Renvoize (ashimema) 2025-10-31 09:20:12 UTC
Created attachment 188779 [details] [review]
Bug 39438: Add DBIC schema relationships for agreement period additional fields

This patch adds the required DBIx::Class relationship definitions to
Koha::Schema::Result::ErmAgreementPeriod to support additional fields
and extended attributes on agreement periods.

Two has_many relationships are added:
- additional_field_values: links to all additional field values
- extended_attributes: alias for additional_field_values

Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Comment 4 Martin Renvoize (ashimema) 2025-10-31 09:20:54 UTC
Takes the same well-trodden road as the rest of these, works as expected.. Passing QA
Comment 5 Jonathan Druart 2025-11-04 15:21:44 UTC
Created attachment 189021 [details] [review]
Bug 39438: Add additional fields support to ERM agreement periods

This patch enables additional fields functionality for agreement periods
in the ERM (Electronic Resource Management) module, allowing libraries
to define custom metadata fields for agreement period records.

Changes include:
- Update Koha::AdditionalField to support erm_agreement_periods table
- Modify API definitions to include extended_attributes in responses
- Add erm_agreement_periods option to additional fields admin interface
- Enhance Vue components to display and manage additional field values
- Update ShowElement component to handle period-specific attributes

Test plan:
1. Navigate to Administration > Additional fields
2. Create new fields for "Agreement periods"
3. Edit an ERM agreement and add/edit period information
4. Verify additional fields appear and can be populated
5. Confirm values are saved and displayed correctly

Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Comment 6 Jonathan Druart 2025-11-04 15:21:46 UTC
Created attachment 189022 [details] [review]
Bug 39438: Add DBIC schema relationships for agreement period additional fields

This patch adds the required DBIx::Class relationship definitions to
Koha::Schema::Result::ErmAgreementPeriod to support additional fields
and extended attributes on agreement periods.

Two has_many relationships are added:
- additional_field_values: links to all additional field values
- extended_attributes: alias for additional_field_values

Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Comment 7 Jonathan Druart 2025-11-04 15:21:49 UTC
Created attachment 189023 [details] [review]
Bug 39438: (bug 38446 follow-up) Add agreement_period to /erm/extended_attribute_types

Sponsored-by: Karlsruhe Institute of Technology (KIT)