Bug 42710: Set library to logged in library for new suggestions

To test:
1.  Acquisitions -> Suggestions ->Add suggestion
2.  Notice the under Acquisition information the library is set to Any
3.  APPLY PATCH
4.  Try again, library should be set to the logged in library.
5.  Make a suggestion and set it to some branch other then the logged in branch
6   Edit the suggestion from step 5, ensure that the "Library:" is properly set

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
This commit is contained in:
Lucas Gass 2026-05-28 16:38:00 +00:00 committed by Pedro Amorim
parent af711ae7c0
commit f2735f73ef
No known key found for this signature in database
GPG Key ID: 06B75BA7F3894D55
2 changed files with 1 additions and 2 deletions

View File

@ -606,7 +606,7 @@
<label for="branchcode">Library:</label>
<select name="branchcode" id="branchcode">
<option value="">Any</option>
[% PROCESS options_for_libraries libraries => Branches.all( selected => suggestion.branchcode ) %]
[% PROCESS options_for_libraries libraries => Branches.all( selected => suggestion.branchcode || default_branch ) %]
</select>
</li>
<li> [% PROCESS funds_dropdown %] </li>

View File

@ -296,7 +296,6 @@ if ( $op =~ /cud-save/ ) {
$template->param(
other_reason => $other_reason,
default_manageddate => dt_from_string,
default_branch => C4::Context->userenv->{"branch"},
);
$op = 'save';
} elsif ( $op eq "cud-update_status" ) {