[Bug 43944] New: Manual Counter file imports fail on spec compliant files
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43944 Bug ID: 43944 Summary: Manual Counter file imports fail on spec compliant files Initiative type: --- Sponsorship --- status: Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: ERM Assignee: koha-bugs@lists.koha-community.org Reporter: matt.blenkinsop@openfifth.co.uk QA Contact: testopia@bugs.koha-community.org CC: jonathan.druart@gmail.com, jonathan.field@openfifth.co.uk, martin.renvoize@openfifth.co.uk, matt.blenkinsop@openfifth.co.uk, pedro.amorim@openfifth.co.uk Target Milestone: --- Manual counter imports fail if the file provides the date in the format Mmm-yyyy which is what the spec requires. The code instead looks for Mmm yyyy -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43944 Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |matt.blenkinsop@openfifth.c |ity.org |o.uk -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43944 Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk> 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=43944 --- Comment #1 from Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk> --- Created attachment 209721 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=209721&action=edit Bug 43944: Correctly format the date in counter file logic This patch updates counter file logic to work with a Mmm-yyyy format instead of Mmm yyyy. This prevents manual imports from succeeding as a counter compliant file will follow the new format. When parsing a file we still allow the Mmm yyyy format to prevent older files from failing Test plan: 1) Visit https://cop5.projectcounter.org/en/5.0.3/appendices/h-sample-counter-master-... and download an example file, saving it as CSV 2) Try to upload the file 3) It should fail 4) Apply the patches and restart_all 5) Retry the import, it should succeed Assisted-by: Sonnet 5.5 (Anthropic) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43944 --- Comment #2 from Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk> --- Created attachment 209722 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=209722&action=edit Bug 43944: Add unit tests Assisted-by: Sonnet 5.5 (Anthropic) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43944 Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk> 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=43944 Community Sandboxes <sandboxes@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #209721|0 |1 is obsolete| | Attachment #209722|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43944 --- Comment #3 from Community Sandboxes <sandboxes@biblibre.com> --- Created attachment 210131 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=210131&action=edit Bug 43944: Correctly format the date in counter file logic This patch updates counter file logic to work with a Mmm-yyyy format instead of Mmm yyyy. This prevents manual imports from succeeding as a counter compliant file will follow the new format. When parsing a file we still allow the Mmm yyyy format to prevent older files from failing Test plan: 1) Visit https://cop5.projectcounter.org/en/5.0.3/appendices/h-sample-counter-master-... and download an example file, saving it as CSV 2) Try to upload the file 3) It should fail 4) Apply the patches and restart_all 5) Retry the import, it should succeed Assisted-by: Sonnet 5.5 (Anthropic) Signed-off-by: Michaela Sieber <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=43944 --- Comment #4 from Community Sandboxes <sandboxes@biblibre.com> --- Created attachment 210132 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=210132&action=edit Bug 43944: Add unit tests Assisted-by: Sonnet 5.5 (Anthropic) Signed-off-by: Michaela Sieber <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=43944 Community Sandboxes <sandboxes@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off --- Comment #5 from Community Sandboxes <sandboxes@biblibre.com> --- Signed off using a sandbox -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43944 --- Comment #6 from Michaela Sieber <michaela.sieber@kit.edu> --- Test plan: 1) Visit https://cop5.countermetrics.org/en/5.1.1/appendices/g-sample-counter-reports... and download the TR example file (TSV), saving it as CSV 2) Enable ERMmodule syspref 3) create a provider manually (no need for credentials) with report type TR 4) Manual Upload of the file - Note that in the background job there is a line saying "Titles added: xx" , but "Monthly usages added : 0" --> Job finishes, titles are added, but no monthly usage numbers --> create a report or verify in the database: select count(*) from erm_usage_mus 5) Apply the patches and restart_all 6) Retry the import, it should successful add monthly usage data --> create a report or verify in the database: select count(*) from erm_usage_mus -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43944 Michaela Sieber <michaela.sieber@kit.edu> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=43967 CC| |clemens.tubach@kit.edu, | |nick@bywatersolutions.com Severity|enhancement |normal Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43944 Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |42218 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42218 [Bug 42218] ERM Usage – replace Database Table erm_usage_yus with a View -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43944 Michaela Sieber <michaela.sieber@kit.edu> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|normal |major Keywords| |rel_26_11_candidate QA Contact|testopia@bugs.koha-communit |nick@bywatersolutions.com |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43944 Nick Clemens (kidclamp) <nick@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=43944 Nick Clemens (kidclamp) <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #210131|0 |1 is obsolete| | Attachment #210132|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43944 --- Comment #7 from Nick Clemens (kidclamp) <nick@bywatersolutions.com> --- Created attachment 210406 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=210406&action=edit Bug 43944: Correctly format the date in counter file logic This patch updates counter file logic to work with a Mmm-yyyy format instead of Mmm yyyy. Currently, manual imports of COUNTER compliant files fail to add any monthly usage data, as compliant files use the Mmm-yyyy format for month columns. When parsing a file we still allow the Mmm yyyy format to prevent older files from failing Test plan: 1) Visit https://cop5.countermetrics.org/en/5.1.1/appendices/g-sample-counter-reports... and download the TR example file (TSV), saving it as CSV 2) Enable the ERMModule system preference 3) Create a usage data provider manually (no need for credentials) with report type TR 4) Manually upload the file 5) Note that the background job reports "Titles added: xx" but "Monthly usages added: 0" and that no monthly usage data is present: select count(*) from erm_usage_mus; 6) Apply the patches and restart_all 7) Retry the import, monthly usage data should now be added Assisted-by: Sonnet 5.5 (Anthropic) Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43944 --- Comment #8 from Nick Clemens (kidclamp) <nick@bywatersolutions.com> --- Created attachment 210407 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=210407&action=edit Bug 43944: Add unit tests Assisted-by: Sonnet 5.5 (Anthropic) Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43944 Pedro Amorim (ammopt) <pedro.amorim@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to main Version(s)| |26.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=43944 --- Comment #9 from Pedro Amorim (ammopt) <pedro.amorim@openfifth.co.uk> --- Thanks everyone! Pushed to main for 26.11! -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org