Bug 37649

Summary: Unnecessary import in KBART import background job
Product: Koha Reporter: Matt Blenkinsop <matt.blenkinsop>
Component: ERMAssignee: Matt Blenkinsop <matt.blenkinsop>
Status: CLOSED INVALID QA Contact: Marcel de Rooy <m.de.rooy>
Severity: trivial    
Priority: P5 - low CC: jake.deery, jonathan.druart, jonathan.field, m.de.rooy, martin.renvoize, matt.blenkinsop, pedro.amorim
Version: Main   
Hardware: All   
OS: All   
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
Bug 37649: Remove unneccessary JSON import

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..