From 47a75e62e67f7deb05dedde8d6fa15cc5fddeaf1 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Wed, 20 Dec 2023 14:52:10 +0000 Subject: [PATCH] Bug 35616: Update catalog concerns to set/filter on source This patch updates the catalog concerns feature to respect the new 'source' field in the API. We both set the source for new ticket submissions and use it for filtering in the corresponding display tables. To test: 1) Nothing should noticably change here.. follow the test plan for bug 31028 and confirm all continues to work as described there. Signed-off-by: David Nind Signed-off-by: Victor Grousset/tuxayo Signed-off-by: Katrin Fischer --- koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt | 1 + .../intranet-tmpl/prog/en/modules/cataloguing/concerns.tt | 3 ++- koha-tmpl/intranet-tmpl/prog/js/modals/add_catalog_concern.js | 1 + koha-tmpl/opac-tmpl/bootstrap/js/modals/catalog_concern.js | 1 + 4 files changed, 5 insertions(+), 1 deletion(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt index 22521ee41f..3873454a31 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt @@ -1023,6 +1023,7 @@ return; } }, + source: 'catalog', biblio_id: [% biblionumber | uri %] }; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/concerns.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/concerns.tt index c7b23e8204..f16e5f2609 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/concerns.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/concerns.tt @@ -90,7 +90,8 @@ } else { return; } - } + }, + source: 'catalog' }; var tickets_url = '/api/v1/tickets'; diff --git a/koha-tmpl/intranet-tmpl/prog/js/modals/add_catalog_concern.js b/koha-tmpl/intranet-tmpl/prog/js/modals/add_catalog_concern.js index 10c0b3b2e9..d7db5f6a3b 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/modals/add_catalog_concern.js +++ b/koha-tmpl/intranet-tmpl/prog/js/modals/add_catalog_concern.js @@ -17,6 +17,7 @@ $(document).ready(function() { let reporter_id = $('#concern_reporter').val(); let params = { + source: 'catalog', title: concern_title, body: concern_body, biblio_id: biblio_id, diff --git a/koha-tmpl/opac-tmpl/bootstrap/js/modals/catalog_concern.js b/koha-tmpl/opac-tmpl/bootstrap/js/modals/catalog_concern.js index 5e3a4d77b4..e9c791e9de 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/js/modals/catalog_concern.js +++ b/koha-tmpl/opac-tmpl/bootstrap/js/modals/catalog_concern.js @@ -35,6 +35,7 @@ $(document).ready(function() { let reporter_id = $('#concern_reporter').val(); params = { + source: 'catalog', title: concern_title, body: concern_body, biblio_id: biblio_id, -- 2.39.5