View | Details | Raw Unified | Return to bug 15516
Collapse All | Expand All

(-)a/circ/circulation.pl (-1 / +1 lines)
Lines 598-604 if ($patron) { Link Here
598
    my $holds = Koha::Holds->search( { borrowernumber => $borrowernumber } );    # FIXME must be Koha::Patron->holds
598
    my $holds = Koha::Holds->search( { borrowernumber => $borrowernumber } );    # FIXME must be Koha::Patron->holds
599
    my $waiting_holds = $holds->waiting;
599
    my $waiting_holds = $holds->waiting;
600
    $template->param(
600
    $template->param(
601
        holds_count  => $holds->count(),
601
        holds_count  => $holds->count_holds,
602
        WaitingHolds => $waiting_holds,
602
        WaitingHolds => $waiting_holds,
603
    );
603
    );
604
604
(-)a/circ/view_holdsqueue.pl (+10 lines)
Lines 55-60 if ($run_report) { Link Here
55
            locationslimit => $locationslimit
55
            locationslimit => $locationslimit
56
        }
56
        }
57
    );
57
    );
58
    for my $item (@$items) {
59
        my $related_hold = Koha::Holds->search(
60
            {
61
                borrowernumber => $item->{borrowernumber}, reservedate => $item->{reservedate},
62
                biblionumber   => $item->{biblionumber}
63
            },
64
            { order_by => 'reservedate' }
65
        )->next;
66
        $item->{hold_group_id} = $related_hold ? $related_hold->hold_group_id : undef;
67
    }
58
68
59
    $template->param(
69
    $template->param(
60
        branchlimit    => $branchlimit,
70
        branchlimit    => $branchlimit,
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/hold-group-modal.inc (+14 lines)
Line 0 Link Here
1
<div id="hold-group-modal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="hold-group-modal-label">
2
    <div class="modal-dialog" role="document">
3
        <div class="modal-content">
4
            <div class="modal-header">
5
                <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
6
                <h4 class="modal-title" id="hold-group-modal-label">Hold group</h4>
7
            </div>
8
            <div class="modal-body"> </div>
9
            <div class="modal-footer">
10
                <button type="button" class="btn btn-default deny" data-dismiss="modal">Close</button>
11
            </div> </div
12
        ><!-- /.modal-content --> </div
13
    ><!-- /.modal-dialog --> </div
14
><!-- /.modal -->
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/holds_table.inc (+3 lines)
Lines 260-265 Link Here
260
                    [%- IF hold.non_priority -%]
260
                    [%- IF hold.non_priority -%]
261
                        <br /><i>Non priority hold</i>
261
                        <br /><i>Non priority hold</i>
262
                    [%- END -%]
262
                    [%- END -%]
263
                    [%- IF hold.hold_group_id -%]
264
                        <div>(part of a <a href="/cgi-bin/koha/reserve/hold-group.pl?hold_group_id=[% hold.hold_group_id | uri %]" class="hold-group">hold group</a>)</div>
265
                    [%- END -%]
263
                </td>
266
                </td>
264
                [%- IF ( CAN_user_reserveforothers_modify_holds_priority ) -%]
267
                [%- IF ( CAN_user_reserveforothers_modify_holds_priority ) -%]
265
                    [%- UNLESS hold.found -%]
268
                    [%- UNLESS hold.found -%]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt (+3 lines)
Lines 1074-1079 Link Here
1074
[% END %]
1074
[% END %]
1075
[% INCLUDE modals/cancel_booking.inc %]
1075
[% INCLUDE modals/cancel_booking.inc %]
1076
1076
1077
[% INCLUDE 'hold-group-modal.inc' %]
1078
1077
[% MACRO jsinclude BLOCK %]
1079
[% MACRO jsinclude BLOCK %]
1078
    [% INCLUDE 'datatables.inc' %]
1080
    [% INCLUDE 'datatables.inc' %]
1079
    [% INCLUDE 'select2.inc' %]
1081
    [% INCLUDE 'select2.inc' %]
Lines 1113-1118 Link Here
1113
    [% Asset.js("js/cancel_booking_modal.js") | $raw %]
1115
    [% Asset.js("js/cancel_booking_modal.js") | $raw %]
1114
    [% Asset.js("js/combobox.js") | $raw %]
1116
    [% Asset.js("js/combobox.js") | $raw %]
1115
    [% INCLUDE 'js-biblio-format.inc' %]
1117
    [% INCLUDE 'js-biblio-format.inc' %]
1118
    [% Asset.js("js/hold-group.js") | $raw %]
1116
    <script>
1119
    <script>
1117
        table_settings_issues_table = [% TablesSettings.GetTableSettings( 'circ', 'circulation', 'issues-table', 'json' ) | $raw %]
1120
        table_settings_issues_table = [% TablesSettings.GetTableSettings( 'circ', 'circulation', 'issues-table', 'json' ) | $raw %]
1118
        table_settings_relatives_issues_table = [% TablesSettings.GetTableSettings( 'circ', 'circulation', 'relatives-issues-table', 'json' ) | $raw %]
1121
        table_settings_relatives_issues_table = [% TablesSettings.GetTableSettings( 'circ', 'circulation', 'relatives-issues-table', 'json' ) | $raw %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt (+6 lines)
Lines 109-114 Link Here
109
                                                [% ELSE %]
109
                                                [% ELSE %]
110
                                                    [% IF ( biblio.biblioitem.publicationyear ) %]<p>[% biblio.biblioitem.publicationyear | html %]</p>[% END %]
110
                                                    [% IF ( biblio.biblioitem.publicationyear ) %]<p>[% biblio.biblioitem.publicationyear | html %]</p>[% END %]
111
                                                [% END %]
111
                                                [% END %]
112
                                                [% IF ( hold.hold_group_id ) %]
113
                                                    <p>(part of a <a class="hold-group" href="/cgi-bin/koha/reserve/hold-group.pl?hold_group_id=[% hold.hold_group_id | html %]">hold group</a>)</p>
114
                                                [% END %]
112
                                            </td>
115
                                            </td>
113
                                        [% ELSE %]
116
                                        [% ELSE %]
114
                                            <td>"</td>
117
                                            <td>"</td>
Lines 289-297 Link Here
289
</div>
292
</div>
290
<!-- /.main.container-fluid -->
293
<!-- /.main.container-fluid -->
291
294
295
[% INCLUDE 'hold-group-modal.inc' %]
296
292
[% MACRO jsinclude BLOCK %]
297
[% MACRO jsinclude BLOCK %]
293
    [% INCLUDE 'calendar.inc' %]
298
    [% INCLUDE 'calendar.inc' %]
294
    [% INCLUDE 'datatables.inc' %]
299
    [% INCLUDE 'datatables.inc' %]
300
    [% Asset.js("js/hold-group.js") | $raw %]
295
    <script>
301
    <script>
296
        function get_options(column){
302
        function get_options(column){
297
            let regex = /(<([^>]+)>)/ig; // Remove html tags
303
            let regex = /(<([^>]+)>)/ig; // Remove html tags
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/view_holdsqueue.tt (+6 lines)
Lines 243-248 Link Here
243
                                                            >
243
                                                            >
244
                                                            <em>or any available</em>
244
                                                            <em>or any available</em>
245
                                                        [% END %]
245
                                                        [% END %]
246
                                                        [% IF itemsloo.hold_group_id %]
247
                                                            <div>(part of a <a href="/cgi-bin/koha/reserve/hold-group.pl?hold_group_id=[% itemsloo.hold_group_id | uri %]" class="hold-group">hold group</a>)</div>
248
                                                        [% END %]
246
                                                    </td>
249
                                                    </td>
247
                                                    <td class="hq-patron">
250
                                                    <td class="hq-patron">
248
                                                        <p> [% INCLUDE 'patron-title.inc' invert_name=1 patron=itemsloo.patron hide_patron_infos_if_needed=1 link_to="circulation_reserves" %] </p>
251
                                                        <p> [% INCLUDE 'patron-title.inc' invert_name=1 patron=itemsloo.patron hide_patron_infos_if_needed=1 link_to="circulation_reserves" %] </p>
Lines 345-352 Link Here
345
    </form>
348
    </form>
346
[% END %]
349
[% END %]
347
350
351
[% INCLUDE 'hold-group-modal.inc' %]
352
348
[% MACRO jsinclude BLOCK %]
353
[% MACRO jsinclude BLOCK %]
349
    [% INCLUDE 'datatables.inc' %]
354
    [% INCLUDE 'datatables.inc' %]
355
    [% Asset.js("js/hold-group.js") | $raw %]
350
    <script>
356
    <script>
351
        $(document).ready(function() {
357
        $(document).ready(function() {
352
            var holdst;
358
            var holdst;
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt (+2 lines)
Lines 753-758 Link Here
753
[% END %]
753
[% END %]
754
754
755
[% INCLUDE modals/cancel_booking.inc %]
755
[% INCLUDE modals/cancel_booking.inc %]
756
[% INCLUDE 'hold-group-modal.inc' %]
756
757
757
[% MACRO jsinclude BLOCK %]
758
[% MACRO jsinclude BLOCK %]
758
    [% INCLUDE 'datatables.inc' %]
759
    [% INCLUDE 'datatables.inc' %]
Lines 792-797 Link Here
792
    [% INCLUDE 'str/members-menu.inc' %]
793
    [% INCLUDE 'str/members-menu.inc' %]
793
    [% Asset.js("js/members-menu.js") | $raw %]
794
    [% Asset.js("js/members-menu.js") | $raw %]
794
    [% Asset.js("js/recalls.js") | $raw %]
795
    [% Asset.js("js/recalls.js") | $raw %]
796
    [% Asset.js("js/hold-group.js") | $raw %]
795
    <script>
797
    <script>
796
        const LoadCheckoutsTableDelay = 0;
798
        const LoadCheckoutsTableDelay = 0;
797
        const AlwaysLoadCheckoutsTable = [% Koha.Preference('AlwaysLoadCheckoutsTable') | html %];
799
        const AlwaysLoadCheckoutsTable = [% Koha.Preference('AlwaysLoadCheckoutsTable') | html %];
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/hold-group.tt (+31 lines)
Line 0 Link Here
1
[% INCLUDE 'doc-head-open.inc' %]
2
<title>Holds group ([% hold_group.id | html %]) &rsaquo; Holds &rsaquo; Circulation &rsaquo; Koha</title>
3
[% INCLUDE 'doc-head-close.inc' %]
4
</head>
5
<body id="hold-group">
6
<h1>Holds group ([% hold_group.id | html %])</h1>
7
<div id="main">
8
    [% holds = hold_group.holds %]
9
    [% IF holds.count %]
10
        <table>
11
            <thead>
12
                <tr>
13
                    <th>Title</th>
14
                    <th>Priority</th>
15
                    <th>Notes</th>
16
                </tr>
17
            </thead>
18
            <tbody>
19
                [% FOREACH hold IN holds %]
20
                    [% biblio = hold.biblio %]
21
                    <tr>
22
                        <td><a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% biblio.biblionumber | uri %]">[% biblio.title | html %]</a></td>
23
                        <td>[% hold.priority | html %]</td>
24
                        <td>[% hold.reservenotes | html %]</td>
25
                    </tr>
26
                [% END %]
27
            </tbody>
28
        </table>
29
    [% END %]
30
    [% INCLUDE 'intranet-bottom.inc' %]
31
</div>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt (-2 / +13 lines)
Lines 611-616 Link Here
611
                            <input name="non_priority" id="non_priority" type="checkbox" />
611
                            <input name="non_priority" id="non_priority" type="checkbox" />
612
                            <span class="hint">A non priority hold doesn't prevent a current checkout from renewing</span>
612
                            <span class="hint">A non priority hold doesn't prevent a current checkout from renewing</span>
613
                        </li>
613
                        </li>
614
615
                        [% IF ( Koha.Preference('DisplayAddHoldGroups') && ( multi_hold ) ) %]
616
                            <li id="hold_group_list_item">
617
                                <label for="hold_group">Treat as hold group: </label>
618
                                <input name="hold_group" id="hold_group" type="checkbox" />
619
                                <span class="hint">Place a hold on the next available title from this group</span>
620
                            </li>
621
                        [% END %]
614
                    </ol>
622
                    </ol>
615
                </fieldset>
623
                </fieldset>
616
                <fieldset class="rows any_specific">
624
                <fieldset class="rows any_specific">
Lines 624-630 Link Here
624
                        [% ELSE %]
632
                        [% ELSE %]
625
                            <input type="radio" id="requestany" name="request" checked="checked" value="Any" />
633
                            <input type="radio" id="requestany" name="request" checked="checked" value="Any" />
626
                        [% END %]
634
                        [% END %]
627
                        <label for="requestany" class="inline"> Hold next available item </label>
635
                        <label for="requestany" class="inline"> Hold next available item: </label>
628
                    </legend>
636
                    </legend>
629
                    <input type="hidden" name="alreadyreserved" value="[% alreadyreserved | html %]" />
637
                    <input type="hidden" name="alreadyreserved" value="[% alreadyreserved | html %]" />
630
                    <fieldset class="enable_request_any disable_request_group disable_request_specific">
638
                    <fieldset class="enable_request_any disable_request_group disable_request_specific">
Lines 660-666 Link Here
660
                                [% END %]
668
                                [% END %]
661
                                [% UNLESS remaining_holds_for_record == 1 %]
669
                                [% UNLESS remaining_holds_for_record == 1 %]
662
                                    <li>
670
                                    <li>
663
                                        <label for="holds_to_place_count">Holds to place (count)</label>
671
                                        <label for="holds_to_place_count">Holds to place (count): </label>
664
                                        <input type="text" inputmode="numeric" pattern="[0-9]*" id="holds_to_place_count" name="holds_to_place_count" value="1" />
672
                                        <input type="text" inputmode="numeric" pattern="[0-9]*" id="holds_to_place_count" name="holds_to_place_count" value="1" />
665
                                    </li>
673
                                    </li>
666
                                [% ELSE %]
674
                                [% ELSE %]
Lines 1420-1430 Link Here
1420
    <form id="hold-actions-form"> [% INCLUDE 'csrf-token.inc' %] </form>
1428
    <form id="hold-actions-form"> [% INCLUDE 'csrf-token.inc' %] </form>
1421
</div>
1429
</div>
1422
1430
1431
[% INCLUDE 'hold-group-modal.inc' %]
1432
1423
[% MACRO jsinclude BLOCK %]
1433
[% MACRO jsinclude BLOCK %]
1424
    [% INCLUDE 'datatables.inc' %]
1434
    [% INCLUDE 'datatables.inc' %]
1425
    [% INCLUDE 'calendar.inc' %]
1435
    [% INCLUDE 'calendar.inc' %]
1426
    [% INCLUDE 'select2.inc' %]
1436
    [% INCLUDE 'select2.inc' %]
1427
    [% Asset.js("js/holds.js") | $raw %]
1437
    [% Asset.js("js/holds.js") | $raw %]
1438
    [% Asset.js("js/hold-group.js") | $raw %]
1428
1439
1429
    [% SET url_biblio_params = "biblionumber=" _ biblionumbers.join("&amp;biblionumber=") %]
1440
    [% SET url_biblio_params = "biblionumber=" _ biblionumbers.join("&amp;biblionumber=") %]
1430
    [% IF multi_hold %]
1441
    [% IF multi_hold %]
(-)a/koha-tmpl/intranet-tmpl/prog/js/hold-group.js (+8 lines)
Line 0 Link Here
1
$(document).ready(function () {
2
    $("body").on("click", "a.hold-group", function () {
3
        var href = $(this).attr("href");
4
        $("#hold-group-modal .modal-body").load(href + " #main");
5
        $("#hold-group-modal").modal("show");
6
        return false;
7
    });
8
});
(-)a/koha-tmpl/intranet-tmpl/prog/js/holds.js (+11 lines)
Lines 208-213 $(document).ready(function () { Link Here
208
                                        "</span>";
208
                                        "</span>";
209
                                }
209
                                }
210
210
211
                                if (oObj.hold_group_id) {
212
                                    title += "<br>";
213
                                    var link =
214
                                        '<a class="hold-group" href="/cgi-bin/koha/reserve/hold-group.pl?hold_group_id=' +
215
                                        oObj.hold_group_id +
216
                                        '">' +
217
                                        __("part of a hold group") +
218
                                        "</a>";
219
                                    title += "<span>(" + link + ")</span>";
220
                                }
221
211
                                return title;
222
                                return title;
212
                            },
223
                            },
213
                        },
224
                        },
(-)a/members/moremember.pl (-2 / +2 lines)
Lines 205-211 if ( $patron->is_expired || $patron->is_going_to_expire ) { Link Here
205
my $holds         = Koha::Holds->search( { borrowernumber => $borrowernumber } );    # FIXME must be Koha::Patron->holds
205
my $holds         = Koha::Holds->search( { borrowernumber => $borrowernumber } );    # FIXME must be Koha::Patron->holds
206
my $waiting_holds = $holds->waiting;
206
my $waiting_holds = $holds->waiting;
207
$template->param(
207
$template->param(
208
    holds_count  => $holds->count(),
208
    holds_count  => $holds->count_holds,
209
    WaitingHolds => $waiting_holds,
209
    WaitingHolds => $waiting_holds,
210
);
210
);
211
211
Lines 289-295 my $patron_lists_count = $patron->get_lists_with_patron->count(); Link Here
289
$template->param(
289
$template->param(
290
    patron                 => $patron,
290
    patron                 => $patron,
291
    issuecount             => $patron->checkouts->count,
291
    issuecount             => $patron->checkouts->count,
292
    holds_count            => $patron->holds->count,
292
    holds_count            => $patron->holds->count_holds,
293
    fines                  => $patron->account->balance,
293
    fines                  => $patron->account->balance,
294
    translated_language    => $translated_language,
294
    translated_language    => $translated_language,
295
    detailview             => 1,
295
    detailview             => 1,
(-)a/opac/opac-reserve.pl (-1 / +1 lines)
Lines 162-168 $template->param( branch => $branch ); Link Here
162
if ( $op eq 'cud-place_reserve' ) {
162
if ( $op eq 'cud-place_reserve' ) {
163
    my $reserve_cnt = 0;
163
    my $reserve_cnt = 0;
164
    if ($maxreserves) {
164
    if ($maxreserves) {
165
        $reserve_cnt = $patron->holds->count;
165
        $reserve_cnt = $patron->holds->count_holds;
166
    }
166
    }
167
167
168
    # List is composed of alternating biblio/item/branch
168
    # List is composed of alternating biblio/item/branch
(-)a/reserve/hold-group.pl (+42 lines)
Line 0 Link Here
1
#!/usr/bin/perl
2
3
# This file is part of Koha.
4
#
5
# Koha is free software; you can redistribute it and/or modify it
6
# under the terms of the GNU General Public License as published by
7
# the Free Software Foundation; either version 3 of the License, or
8
# (at your option) any later version.
9
#
10
# Koha is distributed in the hope that it will be useful, but
11
# WITHOUT ANY WARRANTY; without even the implied warranty of
12
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
# GNU General Public License for more details.
14
#
15
# You should have received a copy of the GNU General Public License
16
# along with Koha; if not, see <http://www.gnu.org/licenses>.
17
18
use Modern::Perl;
19
use CGI qw( -utf8 );
20
21
use C4::Auth   qw( get_template_and_user );
22
use C4::Output qw( output_html_with_http_headers );
23
use Koha::HoldGroups;
24
25
my $cgi = CGI->new;
26
my ( $template, $loggedinuser, $cookie, $flags ) = get_template_and_user(
27
    {
28
        template_name => "reserve/hold-group.tt",
29
        query         => $cgi,
30
        type          => "intranet",
31
        flagsrequired => { circulate => 'circulate_remaining_permissions' },
32
    }
33
);
34
35
my $reserve_group_id = $cgi->param('hold_group_id');
36
my $hold_group       = Koha::HoldGroups->find($reserve_group_id);
37
38
$template->param(
39
    hold_group => $hold_group,
40
);
41
42
output_html_with_http_headers $cgi, $cookie, $template->output;
(-)a/reserve/placerequest.pl (-16 / +26 lines)
Lines 29-55 use C4::Auth qw( checkauth ); Link Here
29
29
30
use Koha::Items;
30
use Koha::Items;
31
use Koha::Patrons;
31
use Koha::Patrons;
32
use Koha::HoldGroup;
32
33
33
my $input = CGI->new();
34
my $input = CGI->new();
34
35
35
checkauth( $input, 0, { reserveforothers => 'place_holds' }, 'intranet' );
36
checkauth( $input, 0, { reserveforothers => 'place_holds' }, 'intranet' );
36
37
37
my @reqbib         = $input->multi_param('reqbib');
38
my @reqbib           = $input->multi_param('reqbib');
38
my @biblionumbers  = $input->multi_param('biblionumber');
39
my @biblionumbers    = $input->multi_param('biblionumber');
39
my @holdable_bibs  = $input->multi_param('holdable_bibs');
40
my @holdable_bibs    = $input->multi_param('holdable_bibs');
40
my $borrowernumber = $input->param('borrowernumber');
41
my $borrowernumber   = $input->param('borrowernumber');
41
my $notes          = $input->param('notes');
42
my $notes            = $input->param('notes');
42
my $branch         = $input->param('pickup');
43
my $branch           = $input->param('pickup');
43
my $startdate      = $input->param('reserve_date') || '';
44
my $startdate        = $input->param('reserve_date') || '';
44
my @rank           = $input->multi_param('rank-request');
45
my @rank             = $input->multi_param('rank-request');
45
my $title          = $input->param('title');
46
my $title            = $input->param('title');
46
my @checkitems     = $input->multi_param('checkitem');
47
my @checkitems       = $input->multi_param('checkitem');
47
my $item_group_id  = $input->param('item_group_id');
48
my $item_group_id    = $input->param('item_group_id');
48
my $expirationdate = $input->param('expiration_date');
49
my $expirationdate   = $input->param('expiration_date');
49
my $itemtype       = $input->param('itemtype') || undef;
50
my $itemtype         = $input->param('itemtype') || undef;
50
my $non_priority   = $input->param('non_priority');
51
my $non_priority     = $input->param('non_priority');
51
my $op             = $input->param('op') || q{};
52
my $op               = $input->param('op') || q{};
52
my $multi_holds    = $input->param('multi_holds');
53
my $multi_holds      = $input->param('multi_holds');
54
my $hold_group_param = $input->param('hold_group') || undef;
55
my $hold_group;
53
56
54
my $patron = Koha::Patrons->find($borrowernumber);
57
my $patron = Koha::Patrons->find($borrowernumber);
55
58
Lines 66-71 foreach my $bibnum (@holdable_bibs) { Link Here
66
69
67
if ( $op eq 'cud-placerequest' && $patron ) {
70
if ( $op eq 'cud-placerequest' && $patron ) {
68
    my %failed_holds;
71
    my %failed_holds;
72
    if ($hold_group_param) {
73
        $hold_group = Koha::HoldGroup->new->store;
74
    }
75
69
    foreach my $biblionumber ( keys %bibinfos ) {
76
    foreach my $biblionumber ( keys %bibinfos ) {
70
77
71
        my $can_override = C4::Context->preference('AllowHoldPolicyOverride');
78
        my $can_override = C4::Context->preference('AllowHoldPolicyOverride');
Lines 102-107 if ( $op eq 'cud-placerequest' && $patron ) { Link Here
102
                                found            => undef,
109
                                found            => undef,
103
                                itemtype         => $itemtype,
110
                                itemtype         => $itemtype,
104
                                non_priority     => $non_priority,
111
                                non_priority     => $non_priority,
112
                                hold_group_id    => $hold_group ? $hold_group->id : undef,
105
                            }
113
                            }
106
                        );
114
                        );
107
115
Lines 130-135 if ( $op eq 'cud-placerequest' && $patron ) { Link Here
130
                        found            => undef,
138
                        found            => undef,
131
                        itemtype         => $itemtype,
139
                        itemtype         => $itemtype,
132
                        non_priority     => $non_priority,
140
                        non_priority     => $non_priority,
141
                        hold_group_id    => $hold_group ? $hold_group->id : undef,
133
                    }
142
                    }
134
                );
143
                );
135
            }
144
            }
Lines 153-158 if ( $op eq 'cud-placerequest' && $patron ) { Link Here
153
                            itemtype         => $itemtype,
162
                            itemtype         => $itemtype,
154
                            non_priority     => $non_priority,
163
                            non_priority     => $non_priority,
155
                            item_group_id    => $item_group_id,
164
                            item_group_id    => $item_group_id,
165
                            hold_group_id    => $hold_group ? $hold_group->id : undef,
156
                        }
166
                        }
157
                    );
167
                    );
158
                }
168
                }
(-)a/reserve/request.pl (-1 / +2 lines)
Lines 188-194 if ( $borrowernumber_hold && !$op ) { Link Here
188
    # we check the reserves of the user, and if they can reserve a document
188
    # we check the reserves of the user, and if they can reserve a document
189
    # FIXME At this time we have a simple count of reservs, but, later, we could improve the infos "title" ...
189
    # FIXME At this time we have a simple count of reservs, but, later, we could improve the infos "title" ...
190
190
191
    my $reserves_count = $patron->holds->count;
191
    my $reserves_count = $patron->holds->count_holds;
192
192
193
    my $new_reserves_count = scalar(@biblionumbers);
193
    my $new_reserves_count = scalar(@biblionumbers);
194
194
Lines 666-671 if ( ( $findborrower && $borrowernumber_hold || $findclub && $club_hold ) Link Here
666
                $reserve{branchcode}       = $res->branchcode();
666
                $reserve{branchcode}       = $res->branchcode();
667
                $reserve{non_priority}     = $res->non_priority();
667
                $reserve{non_priority}     = $res->non_priority();
668
                $reserve{object}           = $res;
668
                $reserve{object}           = $res;
669
                $reserve{hold_group_id}    = $res->hold_group_id;
669
670
670
                if ( $holds_count_per_patron->{ $reserve{'borrowernumber'} } == 1 ) {
671
                if ( $holds_count_per_patron->{ $reserve{'borrowernumber'} } == 1 ) {
671
                    $reserve{'change_hold_type_allowed'} = 1;
672
                    $reserve{'change_hold_type_allowed'} = 1;
(-)a/svc/holds (+1 lines)
Lines 113-118 while ( my $h = $holds_rs->next() ) { Link Here
113
        priority              => $h->priority(),
113
        priority              => $h->priority(),
114
        reservenotes          => $h->reservenotes(),
114
        reservenotes          => $h->reservenotes(),
115
        itemtype_limit        => $itemtype_limit,
115
        itemtype_limit        => $itemtype_limit,
116
        hold_group_id         => $h->hold_group_id,
116
        reservedate_formatted => $h->reservedate()
117
        reservedate_formatted => $h->reservedate()
117
        ? output_pref( { dt => dt_from_string( $h->reservedate() ), dateonly => 1 } )
118
        ? output_pref( { dt => dt_from_string( $h->reservedate() ), dateonly => 1 } )
118
        : q{},
119
        : q{},
(-)a/t/db_dependent/Koha/Holds.t (-2 / +1 lines)
Lines 20-26 Link Here
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use Test::NoWarnings;
22
use Test::NoWarnings;
23
use Test::More tests => 13;
23
use Test::More tests => 14;
24
use Test::Warn;
24
use Test::Warn;
25
25
26
use C4::Circulation qw( AddIssue );
26
use C4::Circulation qw( AddIssue );
27
- 

Return to bug 15516