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: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 2f08c5b8ae)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
This commit is contained in:
Lucas Gass 2026-05-28 16:38:00 +00:00 committed by Baptiste Wojtkowski
parent dba15525f9
commit b7df4cbdf6
No known key found for this signature in database
GPG Key ID: 47A8A13E10BC0D40
2 changed files with 1 additions and 2 deletions

View File

@ -651,7 +651,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" ) {