Bug 24370: (QA follow-up) Make new suggestions default to the library you re viewing

It looks like this problem was caused by code from bug 25033, we were attempting to have the
dropdown either be the current branch filter, or the suggestion's branch code, but the variables here are confusing and it didn't work

This explicitly sets the branchcode when creating a new suggestion to allow fixing current behaviour and
show the correct value when creating new

To test:
1 - Be signed in as branch A
2 - Browse to suggestions and limit to branch "Any"
3 - Click 'New suggestion"
4 - Defaults to Any
5 - Cancel and limit to branch B
6 - New suggestion defaults to branch B

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Nick Clemens 2020-10-20 18:19:46 +00:00 committed by Jonathan Druart
parent 02adde9a43
commit 153ff795ab
1 changed files with 1 additions and 1 deletions

View File

@ -658,7 +658,7 @@
[% IF op == 'else' %]
<div id="toolbar" class="btn-toolbar">
<a class="btn btn-default" id="newsuggestion" href="suggestion.pl?op=add"><i class="fa fa-plus"></i> New purchase suggestion</a>
<a class="btn btn-default" id="newsuggestion" href="suggestion.pl?op=add&branchcode=[% branchcode | uri %]"><i class="fa fa-plus"></i> New purchase suggestion</a>
</div>
<h1>Suggestions management</h1>