[Bug 37502] New: Holdings table needs an ERM tab
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37502 Bug ID: 37502 Summary: Holdings table needs an ERM tab Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: ERM Assignee: jonathan.druart@gmail.com Reporter: esther.melander@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org CC: jonathan.druart@gmail.com, jonathan.field@ptfs-europe.com, martin.renvoize@ptfs-europe.com, matt.blenkinsop@ptfs-europe.com, pedro.amorim@ptfs-europe.com If a bibliographic record is generated via an import in the ERM, the resulting bibliographic record should have an ERM tab in the holdings table. The ERM tab could have the Package and Title info, even if an item record does not exist. Similar to the Acquisitions tab for acquisitions info. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37502 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |michaela.sieber@kit.edu --- Comment #1 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- +1 But I'd also add not only for records created via import, but for every record linked to title/package. :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37502 Mathieu Saby <mathsabypro@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mathsabypro@gmail.com --- Comment #2 from Mathieu Saby <mathsabypro@gmail.com> --- *** Bug 38480 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37502 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au --- Comment #3 from David Cook <dcook@prosentient.com.au> --- (In reply to Katrin Fischer from comment #1)
+1
But I'd also add not only for records created via import, but for every record linked to title/package. :)
This sounds great. I need to delve deeper into the ERM module sometime. While I see how you can import "Titles" and create bib records, I don't see how you can really *manage* the electronic resources. Say you unsubscribe from a package, there's no way to remove the bib records linked to the titles. Or if your package adds titles, it's not clear how you'd go about upgrading the titles at the ERM or bib level... But anyway... -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37502 Michaela Sieber <michaela.sieber@kit.edu> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de --- Comment #4 from Michaela Sieber <michaela.sieber@kit.edu> --- *** Bug 40200 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37502 --- Comment #5 from Michaela Sieber <michaela.sieber@kit.edu> --- It seems that many people are interested in this feature. +1 ERM titles should be linked from a new tab in the catalog When looking at the detail page in the staff interface catalog, we should have have a tab to display information from the ERM module. For example we could display in a little table: - Packages the title is linked to (via erm title - erm resource) - Maybe license information - Maybe agreement information And provide links to these so you can navigate there easily if you have the required permissions. This would allow to tie the catalog and the ERM module closer together. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37502 Clemens Tubach <clemens.tubach@kit.edu> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |clemens.tubach@kit.edu -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37502 --- Comment #6 from Mathieu Saby <mathsabypro@gmail.com> --- Ok but what should happen if you have several ERM packages giving access to the same title (ex for a serial : a direct link for the backfiles, and a link giving access through an aggregator, like Ebsco Business source complete)? Should we ideally have 1 record with the information from the 2 packages in the ERM pane ? In that case, that would imply adding 2 856 links in the record for providing access. If if is not possible, or to complex to be achieved in the short term, can we accept that the function can only apply to data (and links) from a single package? Caution: when the link between the serial module and bibliographic data was established, not all use cases were considered, and several years later we still find ourselves creating tickets in a painstaking attempt to better articulate them... We should not repeat the same mistake with the ERM. What happens if the title is deleted or modified in the ERM? What if the bibliographic record is deleted ? Can the link in 856 be edited manually in the bibliographic record, or should it be "controlled" automatically by the ERM, etc.? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37502 --- Comment #7 from Mathieu Saby <mathsabypro@gmail.com> --- And should this enhancement depend on https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39326 , or be considered separately? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37502 Adolfo Rodríguez Taboada <adolfo.rodriguez@xercode.es> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |adolfo.rodriguez@xercode.es --- Comment #8 from Adolfo Rodríguez Taboada <adolfo.rodriguez@xercode.es> --- 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.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37502 Adolfo Rodríguez Taboada <adolfo.rodriguez@xercode.es> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |In Discussion -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37502 --- Comment #9 from Michaela Sieber <michaela.sieber@kit.edu> --- Hi Adolfo :-) Thank you for the summary and the patch. Unfortunately the patch didn't apply in a sandbox but I would love to test it! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37502 Jeremy Evans <jeremy.evans@ukhsa.gov.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jeremy.evans@ukhsa.gov.uk -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37502 --- Comment #10 from Adolfo Rodríguez Taboada <adolfo.rodriguez@xercode.es> --- Hello Michaela, What version is your sandbox running? The patch applies cleanly on the current main branch. I updated a local instance to the latest main and it worked without any issues. Best regards, Adolfo -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37502 Michaela Sieber <michaela.sieber@kit.edu> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|jonathan.druart@gmail.com |adolfo.rodriguez@xercode.es Status|In Discussion |Needs Signoff --- Comment #11 from Michaela Sieber <michaela.sieber@kit.edu> --- Tested now in a new sandbox -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37502 --- Comment #12 from OpenFifth Sandboxes <sandboxes@openfifth.co.uk> --- Created attachment 200432 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=200432&action=edit Bug 37502: Add ERM tab to catalog detail page Adds an "ERM (N)" tab to the bibliographic record detail page in the staff interface. The tab appears when the ERMModule system preference is enabled and the record has at least one local ERM title linked via biblio_id. For each linked ERM title, a DataTables table displays one row per package (resource) with: package name, vendor, start date, end date, and agreements. Each agreement includes an expandable "Licenses (N)" button (Bootstrap collapse) showing license name, type, status, and dates. Permission model: - Tab is visible to all staff with catalogue access - Links to ERM resources (titles, packages, agreements, licenses) require CAN_user_erm - Links to vendors require CAN_user_acquisition_vendors_manage The tab handles N packages per title and N ERM titles per biblio. It is strictly read-only and introduces no MARC record writes. To test: 1. Enable ERMModule system preference. 2. Go to ERM > eHoldings > Local > Titles, create a title and link it to a bibliographic record (check "Create bibliographic record"). 3. Add one or more packages to the title via the Packages section. 4. Optionally link an agreement to a package, and a license to that agreement. 5. Open the linked bibliographic record in the staff catalog (Cataloging > search for the record). 6. Verify an "ERM (1)" tab appears between Acquisition details and the next tab. 7. Click the ERM tab. Verify the table shows one row per package with package name, vendor, start/end dates and agreements. 8. If an agreement has a license, click "Licenses (N)" and verify the license details expand inline. 9. Log in as a user without the 'erm' permission. Verify the tab is still visible but package/agreement/license names appear as plain text without links. 10. Log in as a user without 'acquisition > vendors_manage'. Verify vendor names appear as plain text. Signed-off-by: Adolfo Rodríguez <adolfo.rodriguez@xercode.es> Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37502 Michaela Sieber <michaela.sieber@kit.edu> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37502 --- Comment #13 from Michaela Sieber <michaela.sieber@kit.edu> --- Created attachment 200433 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=200433&action=edit Screenshot_Patch-37502-ERM-Holdings-Tab-Catalog Screenshot of ERM Holdings Tab on Catalog details page with two ERM titles in different packages and with multiple Agreements and Licences -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37502 --- Comment #14 from Jonathan Druart <jonathan.druart@gmail.com> --- We have REST API route for the ERM module, and it can easily be used to display a table. Why don't you use it? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37502 --- Comment #15 from Jonathan Druart <jonathan.druart@gmail.com> --- Ideally it should even be a Vue island. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37502 --- Comment #16 from Adolfo Rodríguez Taboada <adolfo.rodriguez@xercode.es> --- Created attachment 201059 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=201059&action=edit Patch using Vue island Thank you for the feedback, Jonathan. The patch has been rewritten to address both points. The new approach: Vue island + dedicated REST API endpoint The new patch uses the Vue island pattern (ERMCatalogueTab.vue mounted via islands.ts) and fetches data from a new REST API endpoint: GET /api/v1/biblios/{biblio_id}/erm_holdings Why a new endpoint instead of the existing ERM routes? The existing /api/v1/erm/eholdings/local/titles requires erm: 1 permission. Since the requirement is that the tab should be visible to all staff with catalogue access (not only ERM users), reusing that endpoint would return 403 for users without ERM module access. The new endpoint is declared with x-koha-authorization: permissions: catalogue: "1" and returns a single nested payload (titles → resources → package + vendor + agreements → licenses) in one call. Links to ERM resources and vendors are conditionally rendered in the Vue component based on CAN_user_erm and CAN_user_acquisition_vendors_manage props passed from the template. All functionality from the previous patch is preserved: the tables are rendered via DataTables with per-column search, sorting, and export. The expandable "Licenses (N)" button is also retained. A new patch is attached for review. Have a nice weekend! Greetings, Adolfo. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37502 Adolfo Rodríguez Taboada <adolfo.rodriguez@xercode.es> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37502 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david@davidnind.com Attachment #200432|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37502 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #200319|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37502 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #200433|Screenshot_Patch-37502-ERM- |Screenshot - ERM tab on description|Holdings-Tab-Catalog |staff interface record | |details page -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37502 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #201059|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37502 --- Comment #17 from David Nind <david@davidnind.com> --- Created attachment 201129 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=201129&action=edit Bug 37502: Add ERM tab to catalog detail page Adds an "ERM (N)" tab to the bibliographic record detail page in the staff interface. The tab appears when the ERMModule system preference is enabled and the record has at least one local ERM title linked via biblio_id. Implementation uses the Vue island pattern with a dedicated REST API endpoint GET /api/v1/biblios/{biblio_id}/erm_holdings that requires only catalogue permission, so the tab is visible to all staff users regardless of their ERM module access. The endpoint returns a single nested JSON payload with titles, resources, packages, vendor and agreements (including licenses), avoiding multiple round-trips from the component. The tab handles N packages per title and N ERM titles per biblio. It is strictly read-only and introduces no MARC record writes. Links to ERM titles, packages, agreements and licenses are shown only to users with the erm permission. The vendor link requires the acquisition vendors_manage permission. New files: - Koha/REST/V1/Biblios/ERMHoldings.pm - api/v1/swagger/paths/biblios_erm_holdings.yaml - koha-tmpl/intranet-tmpl/prog/js/vue/components/Islands/ERMCatalogueTab.vue Modified files: - api/v1/swagger/swagger.yaml - catalogue/detail.pl - koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt - koha-tmpl/intranet-tmpl/prog/js/vue/modules/islands.ts To test: 1. Enable ERMModule system preference. 2. Go to ERM > eHoldings > Local > Titles, create a title and link it to a bibliographic record (check "Create bibliographic record"). 3. Add one or more packages to the title via the Packages section. 4. Optionally link an agreement to a package, and a license to that agreement. 5. Open the linked bibliographic record in the staff catalog (Cataloging > search for the record). 6. Verify an "ERM (1)" tab appears between Acquisition details and the next tab. 7. Click the ERM tab. Verify the table shows one row per package with package name, vendor, start/end dates and agreements. 8. If an agreement has a license, click "Licenses (N)" and verify the license details expand inline. 9. Log in as a user without the 'erm' permission. Verify the tab is still visible but package/agreement/license names appear as plain text without links. 10. Log in as a user without 'acquisition > vendors_manage'. Verify vendor names appear as plain text. Signed-off-by: Adolfo Rodríguez <adolfo.rodriguez@xercode.es> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37502 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|unspecified |Main --- Comment #18 from David Nind <david@davidnind.com> --- I have obsoleted the previous patches, reattached the patch so that it is shown correctly for those testing with KTD or sandboxes, and renamed the screenshot. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37502 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37502 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #201129|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37502 --- Comment #19 from David Nind <david@davidnind.com> --- Created attachment 201130 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=201130&action=edit Bug 37502: Add ERM tab to catalog detail page Adds an "ERM (N)" tab to the bibliographic record detail page in the staff interface. The tab appears when the ERMModule system preference is enabled and the record has at least one local ERM title linked via biblio_id. Implementation uses the Vue island pattern with a dedicated REST API endpoint GET /api/v1/biblios/{biblio_id}/erm_holdings that requires only catalogue permission, so the tab is visible to all staff users regardless of their ERM module access. The endpoint returns a single nested JSON payload with titles, resources, packages, vendor and agreements (including licenses), avoiding multiple round-trips from the component. The tab handles N packages per title and N ERM titles per biblio. It is strictly read-only and introduces no MARC record writes. Links to ERM titles, packages, agreements and licenses are shown only to users with the erm permission. The vendor link requires the acquisition vendors_manage permission. New files: - Koha/REST/V1/Biblios/ERMHoldings.pm - api/v1/swagger/paths/biblios_erm_holdings.yaml - koha-tmpl/intranet-tmpl/prog/js/vue/components/Islands/ERMCatalogueTab.vue Modified files: - api/v1/swagger/swagger.yaml - catalogue/detail.pl - koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt - koha-tmpl/intranet-tmpl/prog/js/vue/modules/islands.ts To test: 1. Enable ERMModule system preference. 2. Go to ERM > eHoldings > Local > Titles, create a title and link it to a bibliographic record (check "Create bibliographic record"). 3. Add one or more packages to the title via the Packages section. 4. Optionally link an agreement to a package, and a license to that agreement. 5. Open the linked bibliographic record in the staff catalog (Cataloging > search for the record). 6. Verify an "ERM (1)" tab appears between Acquisition details and the next tab. 7. Click the ERM tab. Verify the table shows one row per package with package name, vendor, start/end dates and agreements. 8. If an agreement has a license, click "Licenses (N)" and verify the license details expand inline. 9. Log in as a user without the 'erm' permission. Verify the tab is still visible but package/agreement/license names appear as plain text without links. 10. Log in as a user without 'acquisition > vendors_manage'. Verify vendor names appear as plain text. Signed-off-by: Adolfo Rodríguez <adolfo.rodriguez@xercode.es> Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37502 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the| |This enhancement adds an release notes| |ERM tab to the record | |details page in the staff | |interface. It lists the ERM | |packages that this title is | |associated with, and | |includes a link to the | |agreement and shows license | |details. --- Comment #20 from David Nind <david@davidnind.com> --- I've signed off, but please note these two things: 1. The qa script complains about tidiness for some files [1] 2. If I add a title to other packages, the number shown in the ERM tab title still remains the same (see new screenshot added). I created bug 42933 (exists before this patch) - you can't add a license to an agreement. Testing notes (using KTD): 1. Apply the patch. 2. Rebuild everything: yarn build 3. Restart everything: restart_all [1] qa script errors - tidiness =============================== qa Tag v25.05.00-1 found in /kohadevbox/koha — checking out branch main in /kohadevbox/qa-test-tools Already on 'main' Your branch is up to date with 'origin/main'. testing 1 commit(s) (applied to fa92634 '32 Bug 42281: Tidy all script tags - ') Processing files [RUNNING] Koha/REST/V1/Biblios/ERMHoldings.pm [RUNNING] api/v1/swagger/paths/biblios_erm_holdings.yaml [RUNNING] api/v1/swagger/swagger.yaml [RUNNING] catalogue/detail.pl [RUNNING] koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt [RUNNING] koha-tmpl/intranet-tmpl/prog/js/vue/components/Islands/ERMCatalogueTab.vue ] 0/7 tests completed [RUNNING] koha-tmpl/intranet-tmpl/prog/js/vue/modules/islands.ts [PASS] api/v1/swagger/paths/biblios_erm_holdings.yaml [PASS] api/v1/swagger/swagger.yaml [FAIL] koha-tmpl/intranet-tmpl/prog/js/vue/components/Islands/ERMCatalogueTab.vue============== ] 2/7 tests completed [PASS] koha-tmpl/intranet-tmpl/prog/js/vue/modules/islands.ts [FAIL] koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt [FAIL] catalogue/detail.pl [FAIL] Koha/REST/V1/Biblios/ERMHoldings.pm Result: [FAIL] Koha/REST/V1/Biblios/ERMHoldings.pm FAIL tidiness File is not tidy, please run `perl misc/devel/tidy.pl Koha/REST/V1/Biblios/ERMHoldings.pm` [PASS] api/v1/swagger/paths/biblios_erm_holdings.yaml [PASS] api/v1/swagger/swagger.yaml [FAIL] catalogue/detail.pl FAIL tidiness File is not tidy, please run `perl misc/devel/tidy.pl catalogue/detail.pl` [FAIL] koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt FAIL tidiness File is not tidy, please run `perl misc/devel/tidy.pl koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt` [FAIL] koha-tmpl/intranet-tmpl/prog/js/vue/components/Islands/ERMCatalogueTab.vue FAIL tidiness File is not tidy, please run `perl misc/devel/tidy.pl koha-tmpl/intranet-tmpl/prog/js/vue/components/Islands/ERMCatalogueTab.vue` [PASS] koha-tmpl/intranet-tmpl/prog/js/vue/modules/islands.ts Processing additional checks PASS! * Was this bug sponsored by anyone? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37502 --- Comment #21 from David Nind <david@davidnind.com> --- Created attachment 201131 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=201131&action=edit Screenshot - ERM tabe for record, number stays as 1 Screenshot showing ERM tab with multiple packages associated with the title - number in brackets stays as '1'. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37502 Adolfo Rodríguez Taboada <adolfo.rodriguez@xercode.es> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #201130|0 |1 is obsolete| | --- Comment #22 from Adolfo Rodríguez Taboada <adolfo.rodriguez@xercode.es> --- Created attachment 201266 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=201266&action=edit New version of the patch with tidied up files Thanks for the sign-off, David! Regarding your comments: Tab counter (ERM (1) with multiple packages): This is intentional. The number shown in the tab label reflects the count of ERM titles linked to the bibliographic record, not the number of packages. A single title can appear in multiple packages, but what we are exposing here is the title-level link — so "ERM (1)" correctly means one ERM title is associated with this biblio. This design decision was deliberate. Tidiness failures: Fixed. The four files flagged by the QA script (Koha/REST/V1/Biblios/ERMHoldings.pm, catalogue/detail.pl, catalogue/detail.tt, ERMCatalogueTab.vue) have been run through misc/devel/tidy.pl and the changes incorporated into the patch. A new version of the patch has been uploaded. Bug 42933: Agreed that this falls outside the scope of this bug. Bug 37502 is specifically about exposing ERM holdings information in the catalogue detail view. The behaviour you described in Bug 42933 is a separate concern and should be addressed there. Greetings, Adolfo. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37502 Adolfo Rodríguez Taboada <adolfo.rodriguez@xercode.es> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37502 --- Comment #23 from OpenFifth Sandboxes <sandboxes@openfifth.co.uk> --- Created attachment 201301 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=201301&action=edit Bug 37502: Add ERM tab to catalog detail page Adds an "ERM (N)" tab to the bibliographic record detail page in the staff interface. The tab appears when the ERMModule system preference is enabled and the record has at least one local ERM title linked via biblio_id. Implementation uses the Vue island pattern with a dedicated REST API endpoint GET /api/v1/biblios/{biblio_id}/erm_holdings that requires only catalogue permission, so the tab is visible to all staff users regardless of their ERM module access. The endpoint returns a single nested JSON payload with titles, resources, packages, vendor and agreements (including licenses), avoiding multiple round-trips from the component. The tab handles N packages per title and N ERM titles per biblio. It is strictly read-only and introduces no MARC record writes. Links to ERM titles, packages, agreements and licenses are shown only to users with the erm permission. The vendor link requires the acquisition vendors_manage permission. New files: - Koha/REST/V1/Biblios/ERMHoldings.pm - api/v1/swagger/paths/biblios_erm_holdings.yaml - koha-tmpl/intranet-tmpl/prog/js/vue/components/Islands/ERMCatalogueTab.vue Modified files: - api/v1/swagger/swagger.yaml - catalogue/detail.pl - koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt - koha-tmpl/intranet-tmpl/prog/js/vue/modules/islands.ts To test: 1. Enable ERMModule system preference. 2. Go to ERM > eHoldings > Local > Titles, create a title and link it to a bibliographic record (check "Create bibliographic record"). 3. Add one or more packages to the title via the Packages section. 4. Optionally link an agreement to a package, and a license to that agreement. 5. Open the linked bibliographic record in the staff catalog (Cataloging > search for the record). 6. Verify an "ERM (1)" tab appears between Acquisition details and the next tab. 7. Click the ERM tab. Verify the table shows one row per package with package name, vendor, start/end dates and agreements. 8. If an agreement has a license, click "Licenses (N)" and verify the license details expand inline. 9. Log in as a user without the 'erm' permission. Verify the tab is still visible but package/agreement/license names appear as plain text without links. 10. Log in as a user without 'acquisition > vendors_manage'. Verify vendor names appear as plain text. Signed-off-by: Adolfo Rodríguez <adolfo.rodriguez@xercode.es> Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37502 Michaela Sieber <michaela.sieber@kit.edu> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37502 --- Comment #24 from David Nind <david@davidnind.com> --- (In reply to Adolfo Rodríguez Taboada from comment #22)
Created attachment 201266 [details] [review] New version of the patch with tidied up files
Thanks for the sign-off, David!
Regarding your comments:
Tab counter (ERM (1) with multiple packages): This is intentional. The number shown in the tab label reflects the count of ERM titles linked to the bibliographic record, not the number of packages. A single title can appear in multiple packages, but what we are exposing here is the title-level link — so "ERM (1)" correctly means one ERM title is associated with this biblio. This design decision was deliberate.
Tidiness failures: Fixed. The four files flagged by the QA script (Koha/REST/V1/Biblios/ERMHoldings.pm, catalogue/detail.pl, catalogue/detail.tt, ERMCatalogueTab.vue) have been run through misc/devel/tidy.pl and the changes incorporated into the patch. A new version of the patch has been uploaded.
Bug 42933: Agreed that this falls outside the scope of this bug. Bug 37502 is specifically about exposing ERM holdings information in the catalogue detail view. The behaviour you described in Bug 42933 is a separate concern and should be addressed there.
Greetings, Adolfo.
Thanks Adolfo! I couldn't figure out how to get multiple titles to link to the bibliographic record (as shown in the original image attached to the bug). Some steps on how to do that would be appreciated (partciularly for the documentation update needed later on). David -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37502 --- Comment #25 from Michaela Sieber <michaela.sieber@kit.edu> --- (In reply to David Nind from comment #24)
I couldn't figure out how to get multiple titles to link to the bibliographic record (as shown in the original image attached to the bug).
Hi David, You can create a list in the catalog and then use that list to create titles and associate them with a package. As soon as you use this "Import from list" function a background job with Type "Create eHolding titles" is startet and will create a new ERM title for the biblio. This is the section in the manual : https://koha-community.org/manual/latest/en/html/erm.html#import-from-list-l... -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37502 --- Comment #26 from Adolfo Rodríguez Taboada <adolfo.rodriguez@xercode.es> --- As Michaela Sieber said, to link several ERM titles to one bibliographic record, you use "Import from list". This is the step-by-step process, I hope this makes it clearer and easier to replicate. 1. Add a bibliographic record to a Koha list (virtualshelf). 2. Create two local packages: "Package A" and "Package B". 3. Go to ERM > eHoldings > Local > Titles > Import from a list. 4. Select Package A, click Import next to your list → creates ERM Title 1 linked to your bib. 5. Repeat: select Package B, click Import on the same list → creates ERM Title 2, also linked to the same bib. 6. Optionally add agreements and licenses to each package. 7. Open the detail view of the bibliographic record in the Intranet → You will see "ERM (2)" with two rows. Greetings, Adolfo. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org