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>
This commit is contained in:
parent
eca5b83960
commit
9122ad9dc6
|
|
@ -278,8 +278,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