[Bug 36831] New: Add support for .txt files to the KBART import tool
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36831 Bug ID: 36831 Summary: Add support for .txt files to the KBART import tool Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: ERM Assignee: jonathan.druart@gmail.com Reporter: matt.blenkinsop@ptfs-europe.com CC: jonathan.druart@gmail.com, jonathan.field@ptfs-europe.com, martin.renvoize@ptfs-europe.com, matt.blenkinsop@ptfs-europe.com, pedro.amorim@ptfs-europe.com It would be beneficial to be able to import KBART files that are in .txt format and detect what the separation character is -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36831 Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |34788 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34788 [Bug 34788] Add the ability to import KBART files to ERM -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36831 Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|jonathan.druart@gmail.com |matt.blenkinsop@ptfs-europe | |.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36831 Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de --- Comment #1 from Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> --- *** Bug 36903 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36831 Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36831 --- Comment #2 from Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> --- Created attachment 166958 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=166958&action=edit Bug 36831: Add a method to determine the file delimiter This patch adds a method to determine whether a file is a CSV or TSV file -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36831 --- Comment #3 from Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> --- Created attachment 166959 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=166959&action=edit Bug 36831: Allow for multiple file types This patch allows the KBART import tool to accept different filetypes and then work out whether they are CSV or TSV files. Test plan: 1) Try to import the file attached to the bug using the KBART import tool (E-resource management > eHoldings > Local > Titles > Import from a KBART file) 2) It should return an error saying that the file must be .csv or .tsv 3) Apply patch 4) yarn build 5) restart_all 6) Repeat step 1 7) The file should now successfully import -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36831 --- Comment #4 from Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> --- Created attachment 166960 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=166960&action=edit Bug 36831: Add unit test prove t/db_dependent/Koha/BackgroundJob/ImportKBARTFile.t -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36831 --- Comment #5 from Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> --- Created attachment 166961 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=166961&action=edit test file -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36831 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |michaela.sieber@kit.edu -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36831 Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |36895 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36895 [Bug 36895] Background job links for KBART import are not working -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36831 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36831 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #166958|0 |1 is obsolete| | --- Comment #6 from David Nind <david@davidnind.com> --- Created attachment 166989 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=166989&action=edit Bug 36831: Add a method to determine the file delimiter This patch adds a method to determine whether a file is a CSV or TSV file Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36831 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #166959|0 |1 is obsolete| | --- Comment #7 from David Nind <david@davidnind.com> --- Created attachment 166990 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=166990&action=edit Bug 36831: Allow for multiple file types This patch allows the KBART import tool to accept different filetypes and then work out whether they are CSV or TSV files. Test plan: 1) Try to import the file attached to the bug using the KBART import tool (E-resource management > eHoldings > Local > Titles > Import from a KBART file) 2) It should return an error saying that the file must be .csv or .tsv 3) Apply patch 4) yarn build 5) restart_all 6) Repeat step 1 7) The file should now successfully import Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36831 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #166960|0 |1 is obsolete| | --- Comment #8 from David Nind <david@davidnind.com> --- Created attachment 166991 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=166991&action=edit Bug 36831: Add unit test prove t/db_dependent/Koha/BackgroundJob/ImportKBARTFile.t Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36831 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com --- Comment #9 from Tomás Cohen Arazi <tomascohen@gmail.com> --- I'm not sure about the use of the static method from the background job class in the controller... -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36831 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |In Discussion --- Comment #10 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Are you sure we can really rest assured there won't be a tab character inside some column? I think this won't be robust enough. I propose that we ask the user which delimiter the file uses. One of the options should be *detect* but the current implementation looks fragile. BTW: what about semicolon? I've seen CSV files that use it. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36831 --- Comment #11 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I think asking would be OK too, maybe confirming a "guess" we made first? The problem was that the file ending is most of the time just .txt for KBART. I haven't encountered a ; separated one so far, not sure if it's defined somewhere in the spec. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36831 --- Comment #12 from Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> --- I tried to work out if the Text::CSV_XS library has a method for working out what the delimiter is but couldn't find anything - is there anywhere else in Koha that we would check something like that? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36831 --- Comment #13 from Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> --- (In reply to Tomás Cohen Arazi from comment #9)
I'm not sure about the use of the static method from the background job class in the controller...
Would it make more sense in Koha/ERM/EHoldings/Title or in a new class for KBART files? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36831 --- Comment #14 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- I had a bit of a think about this.. I've seen the following cod in use somewhere.. it tries to best guess using counts of occurrences.. maybe this is an approach we could be happy with? sub detect_delimiter_and_quote { my ($filename) = @_; my $sample_lines = 5; # Number of lines to sample for detection open my $fh, '<', $filename or die "Could not open '$filename': $!"; my @lines; while (<$fh>) { push @lines, $_; last if $. >= $sample_lines; } close $fh; my %delimiter_count; my %quote_count; foreach my $line (@lines) { foreach my $char (',', '\t', ';', '|') { my $count = () = $line =~ /\Q$char\E/g; $delimiter_count{$char} += $count if $count; } foreach my $char ('"', "'") { my $count = () = $line =~ /\Q$char\E/g; $quote_count{$char} += $count if $count; } } # Guess the delimiter with the highest count my ($delimiter) = sort { $delimiter_count{$b} <=> $delimiter_count{$a} } keys %delimiter_count; # Guess the quote character with the highest count my ($quote) = sort { $quote_count{$b} <=> $quote_count{$a} } keys %quote_count; # Fallback to common defaults if nothing is detected $delimiter //= ','; $quote //= '"'; return ($delimiter, $quote); } -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36831 --- Comment #15 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I am happy with whatever you guys think is best - I am glad to see this one moving! I was wondering earlier: can we trust the header row to be a good source? There might be the least surprised there concerning other characters maybe. But I was not sure if only the sequence mattered or if also the header names were mandatory. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36831 Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |36935 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36935 [Bug 36935] BackgroundJob/ImportKBARTFile.t generates warnings -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36831 Bug 36831 depends on bug 34788, which changed state. Bug 34788 Summary: Add the ability to import KBART files to ERM https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34788 What |Removed |Added ---------------------------------------------------------------------------- Status|Needs documenting |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36831 Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #166989|0 |1 is obsolete| | --- Comment #16 from Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> --- Created attachment 168431 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=168431&action=edit Bug 36831: Add a method to determine the file delimiter This patch adds a method that will detect the delimiter and quote character for a file -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36831 --- Comment #17 from Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> --- Created attachment 168432 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=168432&action=edit Bug 36831: Move logic from the background job to the Title object class This patch moves logic out of the background job file and into the Koha::ERM::EHoldings::Title class where it should belong. Methods are also renamed to differentiate between object methods and helper methods -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36831 Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #166990|0 |1 is obsolete| | --- Comment #18 from Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> --- Created attachment 168433 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=168433&action=edit Bug 36831: Allow for multiple file types This patch allows the KBART import tool to accept different filetypes and then work out whether they are CSV or TSV files. Test plan: 1) Try to import the file attached to the bug using the KBART import tool (E-resource management > eHoldings > Local > Titles > Import from a KBART file) 2) It should return an error saying that the file must be .csv or .tsv 3) Apply patch 4) yarn build 5) restart_all 6) Repeat step 1 7) The file should now successfully import -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36831 Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #166991|0 |1 is obsolete| | --- Comment #19 from Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> --- Created attachment 168434 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=168434&action=edit Bug 36831: Add unit test prove t/db_dependent/Koha/BackgroundJob/ImportKBARTFile.t -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36831 Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|In Discussion |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36831 --- Comment #20 from Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> --- Setting back to NSO as there are some fairly large changes. I've used Martin's suggested method but also moved all of the file parsing logic out of the background job file and into the Title class -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36831 Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |36942 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36942 [Bug 36942] Throw an exception if a KBART file can't be read -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36831 Bug 36831 depends on bug 36895, which changed state. Bug 36895 Summary: Background job links for KBART import are not working https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36895 What |Removed |Added ---------------------------------------------------------------------------- Status|Needs documenting |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36831 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Patch doesn't apply CC| |david@davidnind.com --- Comment #21 from David Nind <david@davidnind.com> --- Apologies for taking so long to re-test. The patch no longer applies 8-(... git bz apply 36831 Bug 36831 - Add support for .txt files to the KBART import tool 168431 - Bug 36831: Add a method to determine the file delimiter 168432 - Bug 36831: Move logic from the background job to the Title object class 168433 - Bug 36831: Allow for multiple file types 168434 - Bug 36831: Add unit test Apply? [(y)es, (n)o, (i)nteractive] y Applying: Bug 36831: Add a method to determine the file delimiter Applying: Bug 36831: Move logic from the background job to the Title object class Applying: Bug 36831: Allow for multiple file types Using index info to reconstruct a base tree... M Koha/REST/V1/ERM/EHoldings/Titles/Local.pm Falling back to patching base and 3-way merge... Auto-merging Koha/REST/V1/ERM/EHoldings/Titles/Local.pm CONFLICT (content): Merge conflict in Koha/REST/V1/ERM/EHoldings/Titles/Local.pm error: Failed to merge in the changes. Patch failed at 0001 Bug 36831: Allow for multiple file types -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36831 Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36831 Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #168431|0 |1 is obsolete| | --- Comment #22 from Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> --- Created attachment 170549 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=170549&action=edit Bug 36831: Add a method to determine the file delimiter This patch adds a method that will detect the delimiter and quote character for a file -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36831 Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #168432|0 |1 is obsolete| | --- Comment #23 from Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> --- Created attachment 170550 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=170550&action=edit Bug 36831: Move logic from the background job to the Title object class This patch moves logic out of the background job file and into the Koha::ERM::EHoldings::Title class where it should belong. Methods are also renamed to differentiate between object methods and helper methods -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36831 Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #168433|0 |1 is obsolete| | --- Comment #24 from Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> --- Created attachment 170551 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=170551&action=edit Bug 36831: Allow for multiple file types This patch allows the KBART import tool to accept different filetypes and then work out whether they are CSV or TSV files. Test plan: 1) Try to import the file attached to the bug using the KBART import tool (E-resource management > eHoldings > Local > Titles > Import from a KBART file) 2) It should return an error saying that the file must be .csv or .tsv 3) Apply patch 4) yarn build 5) restart_all 6) Repeat step 1 7) The file should now successfully import -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36831 Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #168434|0 |1 is obsolete| | --- Comment #25 from Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> --- Created attachment 170552 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=170552&action=edit Bug 36831: Add unit test prove t/db_dependent/Koha/BackgroundJob/ImportKBARTFile.t -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36831 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA --- Comment #26 from David Nind <david@davidnind.com> --- See 4 and 5 Testing notes (using KTD): 1. Enable ERMModule system preference 2. Need to set up a package: ERM > eHoldings > Local > Packages > + New package 3. For step 2, I don't get any error - something flashes up very quickly, but then just displays the screen again 4. After applying the patches, yarn build, and restart_all, and repeating Import from KBART file, I get this error: Something went wrong: Error: Something went wrong, check Koha logs for details. 5. Error in /var/log/koha/kohadev/plack-api-error.log: [2024/08/21 11:12:19] [ERROR] POST /api/v1/erm/eholdings/local/titles/import_kbart: unhandled exception (Mojo::Exception)<<Use of inherited AUTOLOAD for non-method Koha:: BackgroundJob::ImportKBARTFile::read_file() is no longer allowed at /kohadevbox/koha/Koha/REST/V1/ERM/EHoldings/Titles/Local.pm line 284.>> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36831 Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36831 Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #170549|0 |1 is obsolete| | --- Comment #27 from Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> --- Created attachment 170562 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=170562&action=edit Bug 36831: Add a method to determine the file delimiter This patch adds a method that will detect the delimiter and quote character for a file -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36831 Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #170550|0 |1 is obsolete| | --- Comment #28 from Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> --- Created attachment 170563 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=170563&action=edit Bug 36831: Move logic from the background job to the Title object class This patch moves logic out of the background job file and into the Koha::ERM::EHoldings::Title class where it should belong. Methods are also renamed to differentiate between object methods and helper methods -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36831 Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #170551|0 |1 is obsolete| | --- Comment #29 from Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> --- Created attachment 170564 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=170564&action=edit Bug 36831: Allow for multiple file types This patch allows the KBART import tool to accept different filetypes and then work out whether they are CSV or TSV files. Test plan: 1) Try to import the file attached to the bug using the KBART import tool (E-resource management > eHoldings > Local > Titles > Import from a KBART file) 2) It should return an error saying that the file must be .csv or .tsv 3) Apply patch 4) yarn build 5) restart_all 6) Repeat step 1 7) The file should now successfully import -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36831 Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #170552|0 |1 is obsolete| | --- Comment #30 from Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> --- Created attachment 170565 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=170565&action=edit Bug 36831: Add unit test prove t/db_dependent/Koha/BackgroundJob/ImportKBARTFile.t -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36831 --- Comment #31 from Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> --- (In reply to David Nind from comment #26)
See 4 and 5
Testing notes (using KTD):
1. Enable ERMModule system preference 2. Need to set up a package: ERM > eHoldings > Local > Packages > + New package 3. For step 2, I don't get any error - something flashes up very quickly, but then just displays the screen again 4. After applying the patches, yarn build, and restart_all, and repeating Import from KBART file, I get this error: Something went wrong: Error: Something went wrong, check Koha logs for details. 5. Error in /var/log/koha/kohadev/plack-api-error.log: [2024/08/21 11:12:19] [ERROR] POST /api/v1/erm/eholdings/local/titles/import_kbart: unhandled exception (Mojo::Exception)<<Use of inherited AUTOLOAD for non-method Koha:: BackgroundJob::ImportKBARTFile::read_file() is no longer allowed at /kohadevbox/koha/Koha/REST/V1/ERM/EHoldings/Titles/Local.pm line 284.>>
Mistake in the rebase on my part. The issue you saw in step 3 will also be solved in this patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36831 Michaela Sieber <michaela.sieber@kit.edu> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA --- Comment #32 from Michaela Sieber <michaela.sieber@kit.edu> --- I tried two different files and in both cases the job failed. 1.) the test file attached to this bug (OUP journals) , separator in the file is comma " Information: Additional columns were detected in your report, please see the list below: OCN Empty column MARC Control Number Subject Collections Year Started at OUP Title History Current Title The data in these columns will not be imported. " That is OK. But the job failed --> 0 % failed There is no error message --- 2.) Springer KBART file Palgrave Education Collection 2011 (https://adminportal.springernature.com/metadata/kbart) , separator in the file is tab " Information: Additional columns were detected in your report, please see the list below: publication_title print_identifier online_identifier date_first_issue_online num_first_vol_online num_first_issue_online date_last_issue_online num_last_vol_online num_last_issue_online title_url first_author title_id embargo_info coverage_depth notes publisher_name publication_type date_monograph_published_print date_monograph_published_online monograph_volume monograph_edition first_editor parent_publication_title_id preceding_publication_title_id access_type The data in these columns will not be imported. " It seems the tab as separation character is not detected. The job also fails. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36831 Bug 36831 depends on bug 36935, which changed state. Bug 36935 Summary: BackgroundJob/ImportKBARTFile.t generates warnings https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36935 What |Removed |Added ---------------------------------------------------------------------------- Status|Needs documenting |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36831 --- Comment #33 from David Nind <david@davidnind.com> --- Note the patch no longer applies: git bz apply 36831 Bug 36831 - Add support for .txt files to the KBART import tool 170562 - Bug 36831: Add a method to determine the file delimiter 170563 - Bug 36831: Move logic from the background job to the Title object class 170564 - Bug 36831: Allow for multiple file types 170565 - Bug 36831: Add unit test Apply? [(y)es, (n)o, (i)nteractive] y Applying: Bug 36831: Add a method to determine the file delimiter Auto packing the repository in background for optimum performance. See "git help gc" for manual housekeeping. Applying: Bug 36831: Move logic from the background job to the Title object class Using index info to reconstruct a base tree... M Koha/REST/V1/ERM/EHoldings/Titles/Local.pm Falling back to patching base and 3-way merge... Auto-merging Koha/REST/V1/ERM/EHoldings/Titles/Local.pm CONFLICT (content): Merge conflict in Koha/REST/V1/ERM/EHoldings/Titles/Local.pm error: Failed to merge in the changes. Patch failed at 0001 Bug 36831: Move logic from the background job to the Title object class -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36831 Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36831 Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #170562|0 |1 is obsolete| | --- Comment #34 from Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> --- Created attachment 176319 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=176319&action=edit Bug 36831: Add a method to determine the file delimiter This patch adds a method that will detect the delimiter and quote character for a file -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36831 Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #170563|0 |1 is obsolete| | --- Comment #35 from Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> --- Created attachment 176320 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=176320&action=edit Bug 36831: Move logic from the background job to the Title object class This patch moves logic out of the background job file and into the Koha::ERM::EHoldings::Title class where it should belong. Methods are also renamed to differentiate between object methods and helper methods -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36831 Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #170564|0 |1 is obsolete| | --- Comment #36 from Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> --- Created attachment 176321 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=176321&action=edit Bug 36831: Allow for multiple file types This patch allows the KBART import tool to accept different filetypes and then work out whether they are CSV or TSV files. Test plan: 1) Try to import the file attached to the bug using the KBART import tool (E-resource management > eHoldings > Local > Titles > Import from a KBART file) 2) It should return an error saying that the file must be .csv or .tsv 3) Apply patch 4) yarn build 5) restart_all 6) Repeat step 1 7) The file should now successfully import squash -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36831 Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #170565|0 |1 is obsolete| | --- Comment #37 from Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> --- Created attachment 176322 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=176322&action=edit Bug 36831: Add unit test prove t/db_dependent/Koha/BackgroundJob/ImportKBARTFile.t -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36831 --- Comment #38 from Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> --- Patch rebased and an error fixed where the method was incorrectly reading tab delimited files -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36831 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36831 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #176319|0 |1 is obsolete| | --- Comment #39 from David Nind <david@davidnind.com> --- Created attachment 176323 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=176323&action=edit Bug 36831: Add a method to determine the file delimiter This patch adds a method that will detect the delimiter and quote character for a file Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36831 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #176320|0 |1 is obsolete| | --- Comment #40 from David Nind <david@davidnind.com> --- Created attachment 176324 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=176324&action=edit Bug 36831: Move logic from the background job to the Title object class This patch moves logic out of the background job file and into the Koha::ERM::EHoldings::Title class where it should belong. Methods are also renamed to differentiate between object methods and helper methods Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36831 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #176321|0 |1 is obsolete| | --- Comment #41 from David Nind <david@davidnind.com> --- Created attachment 176325 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=176325&action=edit Bug 36831: Allow for multiple file types This patch allows the KBART import tool to accept different filetypes and then work out whether they are CSV or TSV files. Test plan: 1) Try to import the file attached to the bug using the KBART import tool (E-resource management > eHoldings > Local > Titles > Import from a KBART file) 2) It should return an error saying that the file must be .csv or .tsv 3) Apply patch 4) yarn build 5) restart_all 6) Repeat step 1 7) The file should now successfully import squash Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36831 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #176322|0 |1 is obsolete| | --- Comment #42 from David Nind <david@davidnind.com> --- Created attachment 176326 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=176326&action=edit Bug 36831: Add unit test prove t/db_dependent/Koha/BackgroundJob/ImportKBARTFile.t Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36831 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the| |This enhancement allows the release notes| |KBART import tool to accept | |different file types and | |then work out whether they | |are CSV or TSV files. (This | |is useful for detecting | |what the separation | |character is for KBART | |files in .txt format.) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36831 Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #176325|0 |1 is obsolete| | --- Comment #43 from Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> --- Created attachment 176347 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=176347&action=edit Bug 36831: Allow for multiple file types This patch allows the KBART import tool to accept different filetypes and then work out whether they are CSV or TSV files. Test plan: 1) Try to import the file attached to the bug using the KBART import tool (E-resource management > eHoldings > Local > Titles > Import from a KBART file) 2) It should return an error saying that the file must be .csv or .tsv 3) Apply patch 4) yarn build 5) restart_all 6) Repeat step 1 7) The file should now successfully import Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36831 --- Comment #44 from Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> --- Just tidying up the commit message on that patch, I'd left a squashed commit message in there by mistake -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36831 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Patch doesn't apply -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36831 Sonia Bouis <sonia.bouis@univ-lyon3.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |sonia.bouis@univ-lyon3.fr -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36831 Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36831 Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #176323|0 |1 is obsolete| | --- Comment #45 from Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> --- Created attachment 179679 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=179679&action=edit Bug 36831: Add a method to determine the file delimiter This patch adds a method that will detect the delimiter and quote character for a file Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36831 Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #176324|0 |1 is obsolete| | --- Comment #46 from Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> --- Created attachment 179680 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=179680&action=edit Bug 36831: Move logic from the background job to the Title object class This patch moves logic out of the background job file and into the Koha::ERM::EHoldings::Title class where it should belong. Methods are also renamed to differentiate between object methods and helper methods Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36831 Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #176326|0 |1 is obsolete| | --- Comment #47 from Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> --- Created attachment 179681 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=179681&action=edit Bug 36831: Add unit test prove t/db_dependent/Koha/BackgroundJob/ImportKBARTFile.t Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36831 Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #176347|0 |1 is obsolete| | --- Comment #48 from Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> --- Created attachment 179682 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=179682&action=edit Bug 36831: Allow for multiple file types This patch allows the KBART import tool to accept different filetypes and then work out whether they are CSV or TSV files. Test plan: 1) Try to import the file attached to the bug using the KBART import tool (E-resource management > eHoldings > Local > Titles > Import from a KBART file) 2) It should return an error saying that the file must be .csv or .tsv 3) Apply patch 4) yarn build 5) restart_all 6) Repeat step 1 7) The file should now successfully import Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36831 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com Version|unspecified |Main Patch complexity|--- |Medium patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36831 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact| |lucas@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36831 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36831 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #179679|0 |1 is obsolete| | --- Comment #49 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Created attachment 185717 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=185717&action=edit Bug 36831: Add a method to determine the file delimiter This patch adds a method that will detect the delimiter and quote character for a file Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36831 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #179680|0 |1 is obsolete| | --- Comment #50 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Created attachment 185718 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=185718&action=edit Bug 36831: Move logic from the background job to the Title object class This patch moves logic out of the background job file and into the Koha::ERM::EHoldings::Title class where it should belong. Methods are also renamed to differentiate between object methods and helper methods Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36831 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #179681|0 |1 is obsolete| | --- Comment #51 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Created attachment 185719 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=185719&action=edit Bug 36831: Add unit test prove t/db_dependent/Koha/BackgroundJob/ImportKBARTFile.t Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36831 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #179682|0 |1 is obsolete| | --- Comment #52 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Created attachment 185720 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=185720&action=edit Bug 36831: Allow for multiple file types This patch allows the KBART import tool to accept different filetypes and then work out whether they are CSV or TSV files. Test plan: 1) Try to import the file attached to the bug using the KBART import tool (E-resource management > eHoldings > Local > Titles > Import from a KBART file) 2) It should return an error saying that the file must be .csv or .tsv 3) Apply patch 4) yarn build 5) restart_all 6) Repeat step 1 7) The file should now successfully import Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36831 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Patch doesn't apply -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36831 --- Comment #53 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Sorry Matt, this one no longer applies. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36831 Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #185717|0 |1 is obsolete| | --- Comment #54 from Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk> --- Created attachment 186274 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=186274&action=edit Bug 36831: Add a method to determine the file delimiter This patch adds a method that will detect the delimiter and quote character for a file Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36831 Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #185718|0 |1 is obsolete| | --- Comment #55 from Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk> --- Created attachment 186275 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=186275&action=edit Bug 36831: Move logic from the background job to the Title object class This patch moves logic out of the background job file and into the Koha::ERM::EHoldings::Title class where it should belong. Methods are also renamed to differentiate between object methods and helper methods Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36831 Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #185719|0 |1 is obsolete| | --- Comment #56 from Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk> --- Created attachment 186276 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=186276&action=edit Bug 36831: Add unit test prove t/db_dependent/Koha/BackgroundJob/ImportKBARTFile.t Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36831 Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #185720|0 |1 is obsolete| | --- Comment #57 from Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk> --- Created attachment 186277 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=186277&action=edit Bug 36831: Allow for multiple file types This patch allows the KBART import tool to accept different filetypes and then work out whether they are CSV or TSV files. Test plan: 1) Try to import the file attached to the bug using the KBART import tool (E-resource management > eHoldings > Local > Titles > Import from a KBART file) 2) It should return an error saying that the file must be .csv or .tsv 3) Apply patch 4) yarn build 5) restart_all 6) Repeat step 1 7) The file should now successfully import Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36831 Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36831 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to main Version(s)| |25.11.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36831 --- Comment #58 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Nice work everyone! Pushed to main for 25.11 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36831 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |additional_work_needed -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36831 --- Comment #59 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Tests from Bug 40579 caught something. Every Text::CSV should have "Add formula => 'empty'" -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36831 --- Comment #60 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Created attachment 186598 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=186598&action=edit Bug 36831: (follow-up): Add formula injection protection Without patch: prove /kohadevbox/koha/xt/author/Text_CSV_Various.t FAIL With patch: prove /kohadevbox/koha/xt/author/Text_CSV_Various.t PASS -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36831 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|additional_work_needed | --- Comment #61 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- follow-up pushed to main -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36831 Laura Escamilla <Laura.escamilla@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to main |Needs documenting CC| |Laura.escamilla@bywatersolu | |tions.com --- Comment #62 from Laura Escamilla <Laura.escamilla@bywatersolutions.com> --- This is an enhancement and will not be backported to the 25.05.x branch. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org