Bug 37649 - Unnecessary import in KBART import background job
Summary: Unnecessary import in KBART import background job
Status: CLOSED INVALID
Alias: None
Product: Koha
Classification: Unclassified
Component: ERM (show other bugs)
Version: Main
Hardware: All All
: P5 - low trivial
Assignee: Matt Blenkinsop
QA Contact: Marcel de Rooy
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-08-15 10:16 UTC by Matt Blenkinsop
Modified: 2025-06-02 20:45 UTC (History)
7 users (show)

See Also:
GIT URL:
Initiative type: ---
Sponsorship status: ---
Comma delimited list of Sponsors:
Crowdfunding goal: 0
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Bug 37649: Remove unneccessary JSON import (1.05 KB, patch)
2024-08-15 10:19 UTC, Matt Blenkinsop
Details | Diff | Splinter Review
Bug 37649: Remove unneccessary JSON import (1.11 KB, patch)
2024-08-15 11:24 UTC, Jake Deery
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Matt Blenkinsop 2024-08-15 10:16:30 UTC

    
Comment 1 Matt Blenkinsop 2024-08-15 10:19:19 UTC
Created attachment 170345 [details] [review]
Bug 37649: Remove unneccessary JSON import

This patch removes an unncessary import of the JSON module in the KBART import background job

Test plan:
1) Look at the patch diff and note the removal of the import
2) Run t/db_dependent/Koha/BackgroundJob/ImportKBARTFile.t
Comment 2 Jake Deery 2024-08-15 11:24:24 UTC
Created attachment 170355 [details] [review]
Bug 37649: Remove unneccessary JSON import

This patch removes an unncessary import of the JSON module in the KBART import background job

Test plan:
1) Look at the patch diff and note the removal of the import
2) Run t/db_dependent/Koha/BackgroundJob/ImportKBARTFile.t

Signed-off-by: Jake Deery <jake.deery@ptfs-europe.com>
Comment 3 Jake Deery 2024-08-15 11:25:41 UTC
Working us today, Matt — signed off :-)

Jake
Comment 4 Marcel de Rooy 2024-08-16 06:53:56 UTC
Hmm.

sub is_file_too_large {
    my ( $params_to_store, $max_allowed_packet ) = @_;

    my $json           = JSON->new->utf8(0);

Whats that JSON doing there?
If you remove a module, the only thing to check is if it is still used..