Bug 42071: Add 'show' to options that load a single suggestion

Test plan:

Before applying the patch:
1. Go to acquisitions
2. Go to Purchase Suggestions
3. Create a purchase suggestion (for ease of testing, select Centerville for the library)
4. On the table, click on the suggestion number
5. Observe the suggestion does not populate, including the breadcrumbs, but the url does contain the suggestion number.
6. Apply the patch
7. restart_all
8. Rpeat steps 1-4
9. Observe the suggestion now populates and can be edited.

Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
(cherry picked from commit 6cb1868e19)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
This commit is contained in:
Lisette Scheer 2026-03-11 21:16:30 +00:00 committed by Baptiste Wojtkowski
parent 85ea56a170
commit b53063f96c
No known key found for this signature in database
GPG Key ID: 47A8A13E10BC0D40
1 changed files with 5 additions and 0 deletions

View File

@ -113,6 +113,11 @@ if ( !$valid_displayby{$displayby} ) {
my $reasonsloop = GetAuthorisedValues("SUGGEST");
my $suggestion_ref = { $input->Vars };
my $stored_suggestion;
if ( $op eq "edit_form" || $op eq "show" ) {
$stored_suggestion = Koha::Suggestions->find( $input->param('suggestionid') ) if $input->param('suggestionid');
}
delete $suggestion_ref->{$_} for qw(csrf_token suggestion_itemtype suggestion_managedby table_1_length);
# get only the columns of Suggestion