Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug 38050 - /lists #136

Open
wants to merge 64 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
04dbbcc
Bug 38826: Make check_api_auth $sessionID consistent
minusdavid Jan 5, 2025
723ed39
Bug 38777: Use branch reply to for HOLD messages
kidclamp Dec 23, 2024
f1876c1
Bug 38546: Set tabWidth and useTabs in prettierrc
joubu Nov 28, 2024
885f33b
Bug 38738: Only close select element if needed
ammopt Dec 18, 2024
e1a8dc8
Revert "Bug 36025: Selenium test for the query parameters"
kfischer Jan 7, 2025
7d2f41a
Revert "Bug 36025: Incorrect clause in patron search"
kfischer Jan 7, 2025
93e5fdc
Revert "Bug 36025: Selenium test for the query parameters"
kfischer Jan 7, 2025
4b94b65
Bug 38588: Don't generate a second transfer when printing transfer slip
Dec 18, 2024
ee7a4aa
Bug 38588: (follow-up) OK button needs to resubmit returns.pl
Dec 27, 2024
03d6f83
Bug 33268: Add tests
gnucifer Nov 14, 2023
3168da6
Bug 33268: Add tests for context module priority
gnucifer Nov 16, 2023
cb2d98f
Bug 33268: Overlay rules don't work correctly when source is set to *
gnucifer Nov 14, 2023
e2c0403
Bug 33268: If rules exists add rules to preserve current behavior
gnucifer Mar 5, 2024
cd04d58
Bug 33268: (QA follow-up): tidy up code
tuxayo Mar 5, 2024
368d59c
Bug 33268: DBRev 24.12.00.003
kfischer Jan 10, 2025
e32533e
Bug 38827: DataTables - Do not filter when inputs lose focus
joubu Jan 6, 2025
de83983
Bug 38810: SIP account level system preference overrides not properly…
kylemhall Jan 2, 2025
8c3a42a
Bug 38147: Fix Edit and Cancel translatability in booking table
joubu Oct 15, 2024
7f6c186
Bug 22415: Update EDI to use Koha::Logger
mrenvoize Dec 12, 2024
0f3511e
Bug 22415: Add new log config for EDI
mrenvoize Dec 12, 2024
7fb78e4
Bug 22415: (QA follow-up) Fix misc qa issues
kylemhall Jan 10, 2025
af19a0f
Bug 38423: Code more defensively in process_invoice
mrenvoize Nov 12, 2024
210e0cb
Bug 38423: Add unit tests
mrenvoize Dec 12, 2024
08bd56d
Bug 38646: Improve unit test coverage
mrenvoize Jan 8, 2025
26a6e47
Bug 38646: rewrite C4::Languages::getLanguages to use a single cachab…
mkibp Dec 6, 2024
24379ef
Bug 38646: (QA follow-up) Fix ONLY_FULL_GROUP_BY
mrenvoize Jan 7, 2025
6e59b40
Bug 38646: Update unit test for change
mrenvoize Jan 8, 2025
c500a8a
Bug 37927: Fixed report name on page title not showing up when viewin…
LeoStoyanovByWater Jan 7, 2025
ef9c0f6
Bug 14907: Unit tests
kidclamp Nov 19, 2024
eecb123
Bug 14907: Sort item search by cn_sort when sorting by callnumber
kidclamp Nov 19, 2024
70ea004
Bug 38452: Use lc() for case insensitivity
ricofreak Dec 13, 2024
3bd4a9f
Bug 38853: Make 'Cancel selected' on holds table work
Jan 9, 2025
37f85ba
Bug 34068: Fix pagination for hold pickup locations
mblenk Sep 26, 2024
04c095c
Bug 34068: Add tests
joubu Nov 6, 2024
44b29d1
Bug 34068: Fix tests
joubu Nov 6, 2024
27ea32e
Bug 34068: Mock RESTdefaultPageSize
joubu Nov 7, 2024
5a3380a
Bug 38232: Pass exemptfine value into circ-needsconfirmation-modal form
ricofreak Nov 8, 2024
ed04d5b
Bug 38857: Update cronjobs to log run before processing parameters
kidclamp Jan 9, 2025
9e894ee
Bug 38857: (QA follow-up) Fix perltidy errors
mrenvoize Jan 10, 2025
996ec95
Bug 38846: Only call getLanguages for advanced search pages
minusdavid Jan 8, 2025
9fc470c
Bug 38751: Update ILL::Request->extended_attributes
ammopt Dec 19, 2024
2a6bc07
Bug 38751: Add tests
ammopt Dec 19, 2024
6526e00
Bug 38751: Update Standard ILL backend add_request
ammopt Dec 19, 2024
92fd658
Bug 38751: Update Standard ILL backend migrate
ammopt Jan 3, 2025
576621a
Bug 37448: Add script to allow developers to quickly generate large a…
kylemhall Jul 24, 2024
c42cfec
Bug 37448: Add build_sample_ill_request
ammopt Jul 24, 2024
25fd262
Bug 37448: (QA follow-up) Move POD to make QA Script happy
mrenvoize Jan 8, 2025
45626c7
Bug 38505: CanBookBeIssued preparation: Add tests for falsy barcode
ammopt Nov 21, 2024
89b7f16
Bug 38505: CanBookBeIssued preparation: Appropriate behavior when bar…
ammopt Nov 21, 2024
90304e7
Bug 38505: ill-requests.tt: Use .alert-warning when .alert exists
ammopt Nov 21, 2024
ecd0604
Bug 38505: CirculateILL: Add UNKNOWN_BARCODE warning message
ammopt Nov 21, 2024
642f21a
Bug 38505: CirculateILL: Add ILL::Request::check_out regression tests
ammopt Nov 21, 2024
90774b3
Bug 38855: (bug 22056 follow-up) Remove 'test' directory template-side
joubu Jan 9, 2025
814e132
Bug 36229: Move koha-run-backups to the top of the cron
lathomas64 Jan 8, 2025
5563252
Bug 38845: OpacNoItemTypeImages required to show item type images in …
carolinecyrlarose Jan 7, 2025
bdcbcc0
Bug 38448: Fix inconsistencies in database update messages
davidnind Dec 16, 2024
ede69d5
Bug 38471: update "Field suppresion" to "Field suppression"
Jan 10, 2025
3fc855f
Bug 38856: Typo: EmailAddressForPatronRegistrations - "chooose"
carolinecyrlarose Jan 9, 2025
ae57f11
Bug 38050: create admin CRUD endpoint definitions
Jacobomara901 Oct 29, 2024
88dd3d6
Bug 38050: create methods for admin CRUD list endpoints
Jacobomara901 Oct 29, 2024
9566de9
Bug 38050: create public CRUD list endpoint definitions
Jacobomara901 Oct 29, 2024
765303f
Bug 38050: create methods for public CRUD list endpoints
Jacobomara901 Oct 29, 2024
85b517f
Bug 38050: create tests for admin CRUD list endpoints
Jacobomara901 Jan 7, 2025
10ab8c2
Bug 38050: create tests for public CRUD list endpoints
Jacobomara901 Jan 7, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .prettierrc.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
module.exports = {
arrowParens: "avoid",
trailingComma: "es5",
tabWidth: 4,
useTabs: false,
overrides: [
{
files: "*.vue",
Expand All @@ -9,4 +11,4 @@ module.exports = {
}
}
]
}
}
2 changes: 1 addition & 1 deletion C4/Auth.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1635,7 +1635,7 @@ sub check_api_auth {
-secure => ( C4::Context->https_enabled() ? 1 : 0 ),
-sameSite => 'Lax'
);
return ( $return, $cookie, $session ); # return == 'ok' here
return ( $return, $cookie, $session->id ); # return == 'ok' here

} else {

Expand Down
2 changes: 1 addition & 1 deletion C4/Circulation.pm
Original file line number Diff line number Diff line change
Expand Up @@ -780,7 +780,7 @@ sub CanBookBeIssued {
my $onsite_checkout = $params->{onsite_checkout} || 0;
my $override_high_holds = $params->{override_high_holds} || 0;

my $item_object = $params->{item}
my $item_object = !$barcode ? undef : $params->{item}
// Koha::Items->find( { barcode => $barcode } );

# MANDATORY CHECKS - unless item exists, nothing else matters
Expand Down
1 change: 1 addition & 0 deletions C4/Items.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1238,6 +1238,7 @@ sub SearchItems {
} else {
my $sortby = (0 < grep {$params->{sortby} eq $_} @columns)
? $params->{sortby} : 'itemnumber';
$sortby = 'cn_sort' if $sortby eq 'itemcallnumber';
my $sortorder = (uc($params->{sortorder}) eq 'ASC') ? 'ASC' : 'DESC';
$query .= qq{ ORDER BY $sortby $sortorder };
}
Expand Down
110 changes: 66 additions & 44 deletions C4/Languages.pm
Original file line number Diff line number Diff line change
Expand Up @@ -191,57 +191,79 @@ sub getLanguages {
my $lang = shift;
my $isFiltered = shift;

my @languages_loop;
my $dbh=C4::Context->dbh;
my $dbh = C4::Context->dbh;

my $default_language = 'en';
my $current_language = $default_language;
my $language_list = $isFiltered ? C4::Context->preference("AdvancedSearchLanguages") : undef;
if ($lang) {
$current_language = regex_lang_subtags($lang)->{'language'};
}
my $sth = $dbh->prepare('SELECT * FROM language_subtag_registry WHERE type=\'language\' ORDER BY description');
$sth->execute();
while (my $language_subtag_registry = $sth->fetchrow_hashref) {
my $desc;
# check if language name is stored in current language
my $sth4= $dbh->prepare("SELECT description FROM language_descriptions WHERE type='language' AND subtag =? AND lang = ?");
$sth4->execute($language_subtag_registry->{subtag},$current_language);
while (my $language_desc = $sth4->fetchrow_hashref) {
$desc=$language_desc->{description};
}
my $sth2= $dbh->prepare("SELECT * FROM language_descriptions LEFT JOIN language_rfc4646_to_iso639 on language_rfc4646_to_iso639.rfc4646_subtag = language_descriptions.subtag WHERE type='language' AND subtag =? AND language_descriptions.lang = ?");
if ($desc) {
$sth2->execute($language_subtag_registry->{subtag},$current_language);
}
else {
$sth2->execute($language_subtag_registry->{subtag},$default_language);
}
my $sth3 = $dbh->prepare("SELECT description FROM language_descriptions WHERE type='language' AND subtag=? AND lang=?");
# add the correct description info
while (my $language_descriptions = $sth2->fetchrow_hashref) {
$sth3->execute($language_subtag_registry->{subtag},$language_subtag_registry->{subtag});
my $native_description;
while (my $description = $sth3->fetchrow_hashref) {
$native_description = $description->{description};
}

# fill in the ISO6329 code
$language_subtag_registry->{iso639_2_code} = $language_descriptions->{iso639_2_code};
# fill in the current selected ui language's translation, as well as the native description of the language
if ($native_description) {
$language_subtag_registry->{language_description} = $language_descriptions->{description} || q{};
$language_subtag_registry->{language_description} .= " ($native_description)";
}
else {
$language_subtag_registry->{language_description} = $language_descriptions->{description};
}
}
# Do not push unless valid iso639-2 code
if ( $language_subtag_registry->{ iso639_2_code } and ( !$language_list || index ( $language_list, $language_subtag_registry->{ iso639_2_code } ) >= 0) ) {
push @languages_loop, $language_subtag_registry;
}
my $language_list = $isFiltered ? C4::Context->preference("AdvancedSearchLanguages") : undef;
my $language_list_cond = $language_list ? 'AND FIND_IN_SET(language_rfc4646_to_iso639.iso639_2_code, ?)' : '';

my $sth = $dbh->prepare("
SELECT
language_subtag_registry.*,
language_rfc4646_to_iso639.iso639_2_code,
CASE
-- If user's localized name of given lang is available
WHEN current_language_descriptions.description IS NOT NULL
THEN
CASE
-- Append native translation of given language if possible
WHEN native_language_descriptions.description IS NOT NULL
AND native_language_descriptions.description != current_language_descriptions.description
THEN CONCAT(current_language_descriptions.description, ' (', native_language_descriptions.description, ')')
ELSE current_language_descriptions.description
END
ELSE -- fall back to English description
CASE
-- Append native translation of given language if possible
WHEN native_language_descriptions.description IS NOT NULL
AND native_language_descriptions.description != language_subtag_registry.description
THEN CONCAT(language_subtag_registry.description, ' (', native_language_descriptions.description, ')')
ELSE language_subtag_registry.description
END
END AS language_description

-- Useful if debugging the query:
-- current_language_descriptions.description AS _current_language_descriptions_description,
-- native_language_descriptions.description AS _native_language_descriptions_description

FROM language_subtag_registry

-- Grab ISO code for language
INNER JOIN language_rfc4646_to_iso639
ON language_rfc4646_to_iso639.rfc4646_subtag = language_subtag_registry.subtag
AND language_rfc4646_to_iso639.iso639_2_code IS NOT NULL

-- Grab language name in user's current language
LEFT JOIN language_descriptions current_language_descriptions
ON current_language_descriptions.subtag = language_subtag_registry.subtag
AND current_language_descriptions.lang = ?
AND current_language_descriptions.type = 'language'

-- Grab language name in the given language itself
LEFT JOIN language_descriptions native_language_descriptions
ON native_language_descriptions.subtag = language_subtag_registry.subtag
AND native_language_descriptions.lang = language_subtag_registry.subtag
AND native_language_descriptions.type = 'language'

WHERE language_subtag_registry.type = 'language'
${language_list_cond}");

if ($language_list) {
$sth->execute($current_language, join ',' => split(/,|\|/, $language_list));
} else {
$sth->execute($current_language);
}

my @languages_list;
while (my $row = $sth->fetchrow_hashref) {
push @languages_list, $row;
}
return \@languages_loop;
return \@languages_list;
}

sub _get_opac_language_dirs {
Expand Down
6 changes: 4 additions & 2 deletions C4/Reserves.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1776,8 +1776,9 @@ sub _koha_notify_reserve {
message_name => 'Hold_Filled'
} );

my $library = Koha::Libraries->find( $hold->branchcode );
my $from_email_address = $library->from_email_address;
my $library = Koha::Libraries->find( $hold->branchcode );
my $from_email_address = $library->from_email_address;
my $reply_email_address = $library->inbound_email_address;

my %letter_params = (
module => 'reserves',
Expand Down Expand Up @@ -1812,6 +1813,7 @@ sub _koha_notify_reserve {
letter => $letter,
borrowernumber => $borrowernumber,
from_address => $from_email_address,
reply_address => $reply_email_address,
message_transport_type => $mtt,
}
);
Expand Down
2 changes: 1 addition & 1 deletion C4/SIP/Sip/MsgType.pm
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ sub handle {
# Set system preference overrides, first global, then account level
# Clear overrides from previous message handling first
foreach my $key ( keys %ENV ) {
delete $ENV{$key} if index($key, 'OVERRIDE_SYSPREF_') > 0;
delete $ENV{$key} if index($key, 'OVERRIDE_SYSPREF_') == 0;
}
foreach my $key ( keys %{ $config->{'syspref_overrides'} } ) {
$ENV{"OVERRIDE_SYSPREF_$key"} = $config->{'syspref_overrides'}->{$key};
Expand Down
2 changes: 1 addition & 1 deletion Koha.pm
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ use vars qw{ $VERSION };
# - #4 : the developer version. The 4th number is the database subversion.
# used by developers when the database changes. updatedatabase take care of the changes itself
# and is automatically called by Auth.pm when needed.
$VERSION = "24.12.00.002";
$VERSION = "24.12.00.003";

sub version {
return $VERSION;
Expand Down
Loading