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

(-)a/Koha/Biblio.pm (-1 / +3 lines)
Lines 565-571 sub get_components_query { Link Here
565
    my $builder = Koha::SearchEngine::QueryBuilder->new(
565
    my $builder = Koha::SearchEngine::QueryBuilder->new(
566
        { index => $Koha::SearchEngine::BIBLIOS_INDEX } );
566
        { index => $Koha::SearchEngine::BIBLIOS_INDEX } );
567
    my $marc = $self->metadata->record;
567
    my $marc = $self->metadata->record;
568
    my $sort = C4::Context->preference('ComponentSortField') . "_" . C4::Context->preference('ComponentSortOrder');
568
    my $component_sort_field = C4::Context->preference('ComponentSortField') // "title";
569
    my $component_sort_order = C4::Context->preference('ComponentSortOrder') // "asc";
570
    my $sort = $component_sort_field . "_" . $component_sort_order;
569
571
570
    my $searchstr;
572
    my $searchstr;
571
    if ( C4::Context->preference('UseControlNumber') ) {
573
    if ( C4::Context->preference('UseControlNumber') ) {
(-)a/installer/data/mysql/atomicupdate/bug_30327_add_sortComponents_syspref.pl (-3 / +3 lines)
Lines 2-16 use Modern::Perl; Link Here
2
2
3
return {
3
return {
4
    bug_number => "30327",
4
    bug_number => "30327",
5
    description => "Add ComponentsSortField and ComponentsSortOrder sysprefs",
5
    description => "Add ComponentSortField and ComponentSortOrder sysprefs",
6
    up => sub {
6
    up => sub {
7
        my ($args) = @_;
7
        my ($args) = @_;
8
        my ($dbh, $out) = @$args{qw(dbh out)};
8
        my ($dbh, $out) = @$args{qw(dbh out)};
9
        $dbh->do(q{
9
        $dbh->do(q{
10
            INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES
10
            INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES
11
            ('ComponentSortField','title','call_number|pubdate|acqdate|title|author','Specify the default field used for sorting','Choice'),
11
            ('ComponentSortField','title','call_number|pubdate|acqdate|title|author','Specify the default field used for sorting','Choice'),
12
            ('ComponentSortOrder','asc','asc|dsc|az|za','Specify the default sort order','Choice')
12
            ('ComponentSortOrder','asc','asc|dsc|az|za','Specify the default sort order','Choice')
13
        });
13
        });
14
        say $out "Added ComponentsSortField and ComponentsSortOrder sysprefs";
14
        say $out "Added ComponentSortField and ComponentSortOrder sysprefs";
15
    },
15
    },
16
};
16
};
(-)a/installer/data/mysql/mandatory/sysprefs.sql (-3 / +2 lines)
Lines 144-151 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
144
('CoceProviders', '', 'aws,gb,ol', 'Coce providers', 'multiple'),
144
('CoceProviders', '', 'aws,gb,ol', 'Coce providers', 'multiple'),
145
('COinSinOPACResults','1','','If ON, use COinS in OPAC search results page.  NOTE: this can slow down search response time significantly','YesNo'),
145
('COinSinOPACResults','1','','If ON, use COinS in OPAC search results page.  NOTE: this can slow down search response time significantly','YesNo'),
146
('CollapseFieldsPatronAddForm','',NULL,'Collapse these fields by default when adding a new patron. These fields can still be expanded.','Multiple'),
146
('CollapseFieldsPatronAddForm','',NULL,'Collapse these fields by default when adding a new patron. These fields can still be expanded.','Multiple'),
147
('ComponentsSortField','title','call_number|pubdate|acqdate|title|author','Specify the default field used for sorting','Choice'),
147
('ComponentSortField','title','call_number|pubdate|acqdate|title|author','Specify the default field used for sorting','Choice'),
148
('ComponentsSortOrder','asc','asc|dsc|az|za','Specify the default sort order','Choice'),
148
('ComponentSortOrder','asc','asc|dsc|az|za','Specify the default sort order','Choice'),
149
('ConfirmFutureHolds','0','','Number of days for confirming future holds','Integer'),
149
('ConfirmFutureHolds','0','','Number of days for confirming future holds','Integer'),
150
('ConsiderOnSiteCheckoutsAsNormalCheckouts','1',NULL,'Consider on-site checkouts as normal checkouts','YesNo'),
150
('ConsiderOnSiteCheckoutsAsNormalCheckouts','1',NULL,'Consider on-site checkouts as normal checkouts','YesNo'),
151
('CreateAVFromCataloguing', '1', '', 'Ability to create authorized values from the cataloguing module', 'YesNo'),
151
('CreateAVFromCataloguing', '1', '', 'Ability to create authorized values from the cataloguing module', 'YesNo'),
152
- 

Return to bug 30327