https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37502

Adolfo Rodríguez Taboada <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]

--- Comment #8 from Adolfo Rodríguez Taboada <[email protected]> ---
Created attachment 200319
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=200319&action=edit
Proposal: ERM tab in catalog detail page — implementation overview

Proposal: ERM tab in catalog detail page — implementation overview

This patch adds an "ERM (N)" tab to catalogue/detail.pl and
catalogue/detail.tt, addressing the requests from comments #1 and #5.

Behaviour

The tab appears when:

* The ERMModule system preference is enabled
* The bibliographic record has at least one local ERM title linked via
biblio_id

It works for any linked record, whether created via ERM import or linked
manually (comment #1).

What is displayed in the tab

For each linked ERM title, a DataTables table shows one row per package
(resource):

Package Vendor  Start date      End date        Agreements
Each agreement row includes an expandable "Licenses (N)" button (Bootstrap
collapse) showing license name, type, status, and dates.

Permission model (comment #5)

* The tab is visible to any staff user with catalogue access — no ERM
permission required to see the data
* Links to ERM titles, packages, agreements and licenses are only shown if
CAN_user_erm
* Links to vendors are only shown if CAN_user_acquisition_vendors_manage


Addressing comment #6 — multiple packages per title

This is already handled naturally by the data model. erm_eholdings_title links
to a biblio via biblio_id, and erm_eholdings_resources provides N rows (one per
package). A serial with direct backfile access and EBSCO BSC access appears as
two rows in the same table. No restriction to a single package.

Regarding the 856 question: title_url lives at the title level
(erm_eholdings_title), not at the resource level. Generating multiple 856
fields from different package URLs would require a new field on
erm_eholdings_resources and belongs in a separate bug (possibly Bug 39326).
This patch is read-only — it does not write to the MARC record.

Addressing lifecycle concerns (comments #3 and #6)

If the ERM title is deleted: biblio_id is set NULL by the FK constraint (ON
DELETE SET NULL) — the tab simply disappears from the bib
If the bib is deleted: the ERM title's biblio_id is set NULL — no orphaned data
The 856 field and title_url are independent — this pre-existing design question
is outside the scope of this bug. See Bug 35095 ("Bibliographic record from
local title only has 245$a") for an existing proposal to enrich the linked MARC
record from ERM title data.
The tab is strictly read-only, so it introduces no new data-integrity risk

Addressing comment #7 — dependency on Bug 39326

Bug 39326 proposes moving package-dependent title metadata to the resource
level. This patch already exposes resource-level data (start/end dates per
package). Should Bug 39326 add new fields at the resource level, they can be
surfaced here as a follow-up without touching the architecture introduced by
this patch. No hard dependency.

Scope of this patch:

Read-only display of ERM relationships in the catalog detail page
Handles N packages per title and N ERM titles per bib
No MARC record writes (not a KBART/856 mapping feature)
Compatible with the current data model; extensible for Bug 39326 outcomes
A working patch is available for review.

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to