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

(-)a/Koha/Checkouts.pm (-1 / +2 lines)
Lines 82-94 sub automatic_checkin { Link Here
82
        { prefetch => 'item'}
82
        { prefetch => 'item'}
83
    );
83
    );
84
84
85
    my $autofill_next = C4::Context->preference('AutoCheckinAutoFill');
85
    my $autofill_next = C4::Context->preference('AutomaticCheckinAutoFill');
86
86
87
    while ( my $checkout = $due_checkouts->next ) {
87
    while ( my $checkout = $due_checkouts->next ) {
88
        if ( $checkout->item->itemtype->automatic_checkin ) {
88
        if ( $checkout->item->itemtype->automatic_checkin ) {
89
            my ( undef, $messages) = C4::Circulation::AddReturn($checkout->item->barcode, $checkout->branchcode, undef, dt_from_string($checkout->date_due) );
89
            my ( undef, $messages) = C4::Circulation::AddReturn($checkout->item->barcode, $checkout->branchcode, undef, dt_from_string($checkout->date_due) );
90
            my $is_transfer = $checkout->branchcode ne $messages->{ResFound}->{branchcode};
90
            my $is_transfer = $checkout->branchcode ne $messages->{ResFound}->{branchcode};
91
            if ( $autofill_next ){
91
            if ( $autofill_next ){
92
                print("autofill next was selected");
92
                if ( $messages->{ResFound} ){
93
                if ( $messages->{ResFound} ){
93
                    C4::Reserves::ModReserveAffect($checkout->item->itemnumber, $checkout->borrowernumber, $is_transfer, $messages->{ResFound}->{reserve_id}, $checkout->{desk_id}, 0);
94
                    C4::Reserves::ModReserveAffect($checkout->item->itemnumber, $checkout->borrowernumber, $is_transfer, $messages->{ResFound}->{reserve_id}, $checkout->{desk_id}, 0);
94
                    if( $is_transfer ){
95
                    if( $is_transfer ){
(-)a/installer/data/mysql/atomicupdate/skeleton.pl (-2 / +2 lines)
Lines 8-16 return { Link Here
8
        my ($dbh, $out) = @$args{qw(dbh out)};
8
        my ($dbh, $out) = @$args{qw(dbh out)};
9
        # Do you stuffs here
9
        # Do you stuffs here
10
        $dbh->do(q{ 
10
        $dbh->do(q{ 
11
                INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES ('AutoCheckinAutoFill', '0', NULL,'Automatically fill the next hold with an automatic checkin cronjob.', 'YesNo'});
11
                INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES ('AutomaticCheckinAutoFill', '0', NULL,'Automatically fill the next hold with an automatic checkin cronjob.', 'YesNo'});
12
        # Print useful stuff here
12
        # Print useful stuff here
13
        # sysprefs
13
        # sysprefs
14
        say $out "Added new system preference 'AutoCheckinAutoFill'";
14
        say $out "Added new system preference 'AutomaticCheckinAutoFill'";
15
    },
15
    },
16
};
16
};
(-)a/installer/data/mysql/mandatory/sysprefs.sql (-1 / +1 lines)
Lines 77-89 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
77
('AuthorityXSLTResultsDisplay','','','Enable XSL stylesheet control over authority results page display on intranet','Free'),
77
('AuthorityXSLTResultsDisplay','','','Enable XSL stylesheet control over authority results page display on intranet','Free'),
78
('AuthSuccessLog','0',NULL,'If enabled, log successful authentications','YesNo'),
78
('AuthSuccessLog','0',NULL,'If enabled, log successful authentications','YesNo'),
79
('autoBarcode','OFF','incremental|annual|hbyymmincr|EAN13|OFF','Used to autogenerate a barcode: incremental will be of the form 1, 2, 3; annual of the form 2007-0001, 2007-0002; hbyymmincr of the form HB08010001 where HB=Home Branch','Choice'),
79
('autoBarcode','OFF','incremental|annual|hbyymmincr|EAN13|OFF','Used to autogenerate a barcode: incremental will be of the form 1, 2, 3; annual of the form 2007-0001, 2007-0002; hbyymmincr of the form HB08010001 where HB=Home Branch','Choice'),
80
('AutoCheckinAutoFill','0',NULL,'Automatically fill the next hold with an automatic check in.','YesNo'),
81
('autoControlNumber','OFF','biblionumber|OFF','Used to autogenerate a Control Number: biblionumber will be as biblionumber, OFF will leave the field as it is;','Choice'),
80
('autoControlNumber','OFF','biblionumber|OFF','Used to autogenerate a Control Number: biblionumber will be as biblionumber, OFF will leave the field as it is;','Choice'),
82
('AutoCreateAuthorities','0',NULL,'Automatically create authorities that do not exist when cataloging records.','YesNo'),
81
('AutoCreateAuthorities','0',NULL,'Automatically create authorities that do not exist when cataloging records.','YesNo'),
83
('AutoCreditNumber', '', '', 'Automatically generate a number for account credits', 'Choice'),
82
('AutoCreditNumber', '', '', 'Automatically generate a number for account credits', 'Choice'),
84
('AutoEmailNewUser','0',NULL,'Send an email to newly created patrons.','YesNo'),
83
('AutoEmailNewUser','0',NULL,'Send an email to newly created patrons.','YesNo'),
85
('AutoShareWithMana','subscription','','defines datas automatically shared with mana','multiple'),
84
('AutoShareWithMana','subscription','','defines datas automatically shared with mana','multiple'),
86
('AutoLocation','0',NULL,'If ON, IP authentication is enabled, blocking access to the staff interface from unauthorized IP addresses','YesNo'),
85
('AutoLocation','0',NULL,'If ON, IP authentication is enabled, blocking access to the staff interface from unauthorized IP addresses','YesNo'),
86
('AutomaticCheckinAutoFill','0',NULL,'Automatically fill the next hold with an automatic check in.','YesNo'),
87
('AutomaticItemReturn','1',NULL,'If ON, Koha will automatically set up a transfer of this item to its homebranch','YesNo'),
87
('AutomaticItemReturn','1',NULL,'If ON, Koha will automatically set up a transfer of this item to its homebranch','YesNo'),
88
('AutoLinkBiblios','0',NULL,'If enabled, link biblio to authorities on creation and edit','YesNo'),
88
('AutoLinkBiblios','0',NULL,'If enabled, link biblio to authorities on creation and edit','YesNo'),
89
('AutomaticConfirmTransfer','0',NULL,'Defines whether transfers should be automatically confirmed at checkin if modal dismissed','YesNo'),
89
('AutomaticConfirmTransfer','0',NULL,'Defines whether transfers should be automatically confirmed at checkin if modal dismissed','YesNo'),
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref (-2 / +2 lines)
Lines 978-988 Circulation: Link Here
978
                  holdingbranch: "item's holding library"
978
                  holdingbranch: "item's holding library"
979
            - "."
979
            - "."
980
        -
980
        -
981
            - pref: AutoCheckinAutoFill
981
            - pref: AutomaticCheckinAutoFill
982
              choices:
982
              choices:
983
                  1: "Do"
983
                  1: "Do"
984
                  0: "Don't"
984
                  0: "Don't"
985
            - allow holds to be automatically filled after being automatically checked in.
985
            - allow holds to be automatically filled after being automatically checked in.
986
            - '<br><strong>NOTE:</strong> These system preferences require the <code>misc/cronjobs/automatic_checkin.pl</code> cronjob. Ask your system administrator to schedule it.<br>'
986
    Patron restrictions:
987
    Patron restrictions:
987
        -
988
        -
988
            - pref: PatronRestrictionTypes
989
            - pref: PatronRestrictionTypes
989
- 

Return to bug 33887