Bug 42757: Use default suggestor or fallback to librarian
To test:
1. Find a patron
2. From the patron account click the "Purchase suggestions" button
3. Make a suggestion
4. That suggestion is not associated with the patron from step 1
5. APPLY PATCH and restart_all
6. Repeart steps 1 -3. The purchase suggestion suggesedby should be the patron from step 1
7. Go Acquisitions -> Suggestions -> Add suggestion
8. Make sure when you do it this way the suggestedby is set to the logged-in-user by default
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 9122ad9dc6)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
This commit is contained in:
parent
ea7394e753
commit
75e0d65da6
|
|
@ -282,8 +282,10 @@ if ( $op =~ /cud-save/ ) {
|
|||
}
|
||||
} elsif ( $op eq 'add_form' ) {
|
||||
|
||||
# get the patron that is suggesting or fall back to the logged-in-user
|
||||
my $default_suggester = $suggestedby ? Koha::Patrons->find($suggestedby) : $librarian;
|
||||
$template->param(
|
||||
default_suggester => $librarian,
|
||||
default_suggester => $default_suggester,
|
||||
default_suggesteddate => dt_from_string,
|
||||
default_branch => C4::Context->userenv->{"branch"},
|
||||
);
|
||||
|
|
|
|||
Loading…
Reference in New Issue