Bug 35380: (QA follow-up) Minor code quality fixes

- Add order_by => ['name'] to record_sources fetch in marc-overlay-rules.pl
  so filter dropdown options are consistently sorted
- Add COMMENT to record_sources.is_system column in kohastructure.sql
  to match convention of other columns in that table
- Remove commented-out Data::Dumper debug lines from biblios.t
- Remove redundant explicit object deletes inside subtests that are
  already wrapped in txn_rollback; the rollback undoes them anyway

Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
This commit is contained in:
Martin Renvoize 2026-03-25 10:12:39 +01:00
parent 38c7696866
commit 6aff5f361a
No known key found for this signature in database
GPG Key ID: 2D86E0EAEC83711B
3 changed files with 2 additions and 10 deletions

View File

@ -126,7 +126,7 @@ my $categories = Koha::Patron::Categories->search_with_library_limits(
)->unblessed;
my @record_sources =
map { $_->{name} } @{ Koha::RecordSources->search->unblessed };
map { $_->{name} } @{ Koha::RecordSources->search( {}, { order_by => ['name'] } )->unblessed };
$template->param(
rules => $rules,

View File

@ -5679,7 +5679,7 @@ CREATE TABLE `record_sources` (
`record_source_id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'Primary key for the `record_sources` table',
`name` text NOT NULL COMMENT 'User defined name for the record source',
`can_be_edited` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'If records from this source can be edited',
`is_system` tinyint(1) NOT NULL DEFAULT 0,
`is_system` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'If this record source is system-defined and cannot be deleted',
PRIMARY KEY (`record_source_id`),
UNIQUE KEY `name` (`name`(191))
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

View File

@ -1939,8 +1939,6 @@ subtest 'put() tests' => sub {
} => $marc
)->status_is(200);
$locked_biblio->delete();
};
subtest 'put() with overlay_context' => sub {
@ -1979,9 +1977,6 @@ subtest 'put() tests' => sub {
</datafield>
</record>|;
#use Data::Dumper;
#warn Dumper($incoming_record_xml);
my $record_source =
$builder->build_object(
{ class => 'Koha::RecordSources', value => { can_be_edited => 1, is_system => 0 } } );
@ -2042,9 +2037,6 @@ subtest 'put() tests' => sub {
'new title',
'Title has been changed'
);
$biblio->delete();
$record_source->delete();
$rule->delete();
};
$schema->storage->txn_rollback;