From eec197565ca8dc1ecb7243b3c03ec4e8acc22ac9 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Thu, 21 Dec 2023 15:58:41 +0000 Subject: [PATCH] Bug 32435: Add resolution states to Catalog concerns This patch adds resolution types to the catalog concerns feature. It allows libraries to define a list of 'TICKET_RESOLUTION' authorized values from which librarians can then pick at the point of resolving a catalog concern. To test: 1) Apply the patches and run the database updates 2) Enable catalog concerns (staff or opac will do the trick) 3) Submit a catalog concern 4) Confirm that you can still resolve a concern from the catalog concerns management page as before. 5) Add some values to the new TICKET_RESOLUTION authorized values 6) Submit a new catalog concern 7) Confirm that the 'Resolve' button in the management modal is now a dropdown containing the list of resolution values defined above. Signed-off-by: David Nind Signed-off-by: Ray Delahunty Signed-off-by: Marcel de Rooy Signed-off-by: Katrin Fischer --- Koha/Ticket.pm | 10 ++++++++++ Koha/Ticket/Update.pm | 10 ++++++++++ .../prog/en/includes/modals/display_ticket.inc | 18 +++++++++++++++++- .../prog/en/modules/cataloguing/concerns.tt | 6 +++++- .../prog/js/modals/display_ticket.js | 4 +++- 5 files changed, 45 insertions(+), 3 deletions(-) diff --git a/Koha/Ticket.pm b/Koha/Ticket.pm index ea17e899de..59792e24bf 100644 --- a/Koha/Ticket.pm +++ b/Koha/Ticket.pm @@ -196,6 +196,16 @@ sub strings_map { } ); + # Fall back to TICKET_RESOLUTION as needed + if ( !$av->count ) { + $av = Koha::AuthorisedValues->search( + { + category => 'TICKET_RESOLUTION', + authorised_value => $self->status, + } + ); + } + my $status_str = $av->count ? $params->{public} diff --git a/Koha/Ticket/Update.pm b/Koha/Ticket/Update.pm index 1ad6b6577a..dad68226f0 100644 --- a/Koha/Ticket/Update.pm +++ b/Koha/Ticket/Update.pm @@ -85,6 +85,16 @@ sub strings_map { } ); + # Fall back to TICKET_RESOLUTION as needed + if ( !$av->count ) { + $av = Koha::AuthorisedValues->search( + { + category => 'TICKET_RESOLUTION', + authorised_value => $self->status, + } + ); + } + my $status_str = $av->count ? $params->{public} diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/modals/display_ticket.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/modals/display_ticket.inc index 29c258d21b..5a3479a0de 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/modals/display_ticket.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/modals/display_ticket.inc @@ -1,5 +1,6 @@ [% USE AuthorisedValues %] [% SET status = AuthorisedValues.GetAuthValueDropbox('TICKET_STATUS') %] +[% SET resolutions = AuthorisedValues.GetAuthValueDropbox('TICKET_RESOLUTION') %]