[Bug 41306] New: Date picker for data harvesting should ask not ask to choose a day
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41306 Bug ID: 41306 Summary: Date picker for data harvesting should ask not ask to choose a day Initiative type: --- Sponsorship --- status: Product: Koha Version: 24.11 Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: ERM Assignee: jonathan.druart@gmail.com Reporter: mathsabypro@gmail.com 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 In erm/eusage/usage_data_providers the date picker for data harvesting (begin and end date) should not ask to choose a day, only a month and a year. The day have no meaning in the context of sushi protocol. I have only checked in 24.11 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41306 --- Comment #1 from Mathieu Saby <mathsabypro@gmail.com> --- Maybe I am wrong, I see that... https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41182 But in other ERMs I know the user is not supposed to choose a day -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41306 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Date picker for data |Date picker for data |harvesting should ask not |harvesting should not ask |ask to choose a day |to choose a day -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41306 Michaela Sieber <michaela.sieber@kit.edu> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=41182 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41306 Michaela Sieber <michaela.sieber@kit.edu> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |andrew.auld@openfifth.co.uk | |, clemens.tubach@kit.edu, | |katrin.fischer@bsz-bw.de, | |michaela.sieber@kit.edu Priority|P5 - low |P1 - high Severity|enhancement |major --- Comment #2 from Michaela Sieber <michaela.sieber@kit.edu> --- Not only is it best practice to perform harvesting on a monthly basis, there are also processing issues in Koha when multiple harvesting runs are carried out on a daily basis within a single month, because Koha aggregates the data instead of overwriting it. We therefor recommend to adjust the date picker in the user interface to allow only months (not days) as suggested Update importance to major. FYI: We can not confirm that the day is mandatory in COUNTER 5.1 which is the current release since January 2025 and obligatory for all providers. The COUNTER standard (R5 as well as R5.1) only requires months: "Reports MUST be provided monthly." "The reports MUST allow the report consumer the flexibility to specify a date range, in terms of months" (see https://cop5.countermetrics.org/en/5.1.0.1/05-delivery/index.html) We therefor recommend to adjust the date picker in the user interface to allow only months (not days) as suggested -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41306 Jan Kissig <bibliothek@th-wildau.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bibliothek@th-wildau.de -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41306 --- Comment #3 from Jan Kissig <bibliothek@th-wildau.de> --- The API though says Begin_Date string<date> End_Date string<date> with example: "Begin_Date": "2022-01-01", "End_Date": "2022-03-31", see: https://countermetrics.stoplight.io/docs/counter-sushi-api/oyshu9qe9aeof-pr-... says Just tested 2 platforms with: begin_date=2025-11 and end_date=2025-11 and the response always included "Report_Filters": { "Begin_Date": "2025-11-01", "End_Date": "2025-11-30" }, So they fill up the 'missing' days. When testing the same with begin_date=2025-12-01 and end_date=2025-12-31 the response remained the same. In general I think it could be dangerous to limit both dates in the query to "YYYY-MM" format and maybe it should be allowed to send dates in "YYYY-MM-DD" or "YYYY-MM" format -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41306 Michaela Sieber <michaela.sieber@kit.edu> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Date picker for data |ERM Usage Date picker for |harvesting should not ask |COUNTER data harvesting |to choose a day |should not ask to choose a | |day -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41306 --- Comment #4 from Michaela Sieber <michaela.sieber@kit.edu> --- Hey Jan :-) I think there is a misunderstanding here. This bug is about the user interface and what the user is allowed to input. The user should only be able to select a month, because according to the standard, no other option is possible anyway. You are right that the API allows specifying dates down to the exact day, but that doesn’t make sense, since the standard only supports monthly time specifications in terms of content. The COUNTER standard (R5 as well as R5.1) only requires months: "Reports MUST be provided monthly." "The reports MUST allow the report consumer the flexibility to specify a date range, in terms of months." (see https://cop5.countermetrics.org/en/5.1.0.1/05-delivery/index.html) And this is the definition for the date range (Begin_Date + End_Date): "Beginning and end of the reporting period. Note that the COUNTER API allows the format yyyy-mm for the API path parameters, which must be expanded with the first/last day of the month for the report header. For the tabular reports these filters are included in the Reporting_Period header instead of the Reporting_Filters header for easier reading." (see https://cop5.countermetrics.org/en/5.1.0.1/03-specifications/03-counter-repo...) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41306 Michaela Sieber <michaela.sieber@kit.edu> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|24.11 |Main -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41306 Michaela Sieber <michaela.sieber@kit.edu> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |43904 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43904 [Bug 43904] [OMNIBUS] ERM Usage Improvements -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41306 Michaela Sieber <michaela.sieber@kit.edu> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|major |normal Patch complexity|--- |Trivial patch Priority|P1 - high |P2 Target Milestone|--- |26.11 Assignee|jonathan.druart@gmail.com |matt.blenkinsop@openfifth.c | |o.uk Status|NEW |ASSIGNED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41306 --- Comment #5 from Michaela Sieber <michaela.sieber@kit.edu> --- Created attachment 208976 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=208976&action=edit 41306_Screenshot_Modal_Harvesting_Month-picker This is how it will be implemented with 26.11 hopefully -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41306 Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |41294 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41294 [Bug 41294] Allow monthly harvesting only so Data not available for certain months do not result in a complete failure of the harvest -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41306 Clemens Tubach <clemens.tubach@kit.edu> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Patch doesn't apply --- Comment #8 from Clemens Tubach <clemens.tubach@kit.edu> --- Patch application failed for attachment 209189 - Bug 41306: Only offer months in the date picker for running a harvest Error: Apply failed: Git command (git am -3 /tmp/fO7OG2Udco/0001-209189.patch) failed: error: sha1 information is lacking or useless (koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/UsageStatisticsDataProvidersList.vue). error: could not build fake ancestor -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41306 Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk> 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=41306 Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #209189|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=41306 Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #209190|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=41306 --- Comment #9 from Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk> --- Created attachment 209293 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=209293&action=edit Bug 41306: Only offer months in the date picker for running a harvest Harvests run per calendar month: Bug 41294 splits any date range into one job per month, so the exact days asked by the "Run now" dialog were noise. The dialog now asks for a begin month and an end month, sends the first and the last day of those months, and only offers months up to the previous one, since the current month is not complete. The end picker starts at the begin month, through the data-date_to link of the staff date pickers, so a begin month after the end month cannot be picked. Typed input is off: the staff date mask does not accept a month name. The calendars are rendered next to their inputs, inside the modal: a calendar at the end of the body takes the focus out of the modal, and the Bootstrap focus trap then reopens the begin picker after a month is picked in the end picker. The body of the confirmation dialog no longer scrolls, so the calendar overlays the footer. The static calendar wraps its input: the dialog gives the wrapper the width the input had and the input fills it. A read-only picker input keeps the calendar icon instead of the lock of a locked field. The dialog was duplicated in the data providers list and the provider page. It now lives in the composable vue/composables/sushiHarvester.js, which both call; this also fixes the provider name that was undefined in the dialog of the provider page. FlatPickrWrapper gains an optional config prop, merged over the staff flatpickr defaults, so a caller can add a plugin or a bound without losing the defaults. Test plan: 1. On the data providers list, click "Run now": the dialog asks for a begin month and an end month. The inputs show the full month name with a calendar icon, and the end month is prefilled with the previous month 2. Open the begin picker: the current month and later are greyed out. The calendar overlays the dialog footer instead of scrolling the dialog 3. Typing in an input is not possible; a month can only be picked 4. Pick a begin month of last year, then open the end picker: the months before the begin month are greyed out, and a click in the end picker does not reopen the begin picker 5. Pick an end month and click "Yes, run": the message lists one job per report type and month, from the begin month to the end month 6. Open a provider page and click "Run now" there: the dialog names the provider and behaves the same 7. Open the job of the first month: the harvest period runs from the first to the last day of that month 8. yarn cypress run --spec t/cypress/integration/ERM/DataProviders_spec.ts Sponsored-by: Karlsruhe Institute of Technology (KIT) Assisted-by: Fable 5.1 (Anthropic) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41306 --- Comment #10 from Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk> --- Created attachment 209294 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=209294&action=edit Bug 41306: Add cypress tests The list test and the provider page test open the "Run now" dialog, check that the dialog asks for months, that the current month is greyed out, pick a month of last year, and check that the request carries the first and the last day of the chosen months. The list test also checks that the end picker greys out the months before the begin month, and that the queued jobs message links to each job. Test plan: yarn cypress run --spec t/cypress/integration/ERM/DataProviders_spec.ts Manual: 1. Open a usage data provider and click "Run now" 2. Check that the current month and later are greyed out in both pickers 3. Pick a begin month, open the end picker: earlier months are greyed out 4. Run and check one job per month and report type in the message Assisted-by: Fable 5.1 (Anthropic) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41306 Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |38822 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38822 [Bug 38822] ERM Usage data provider summary should be more complete (all reports and all months) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41306 Clemens Tubach <clemens.tubach@kit.edu> 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=41306 Clemens Tubach <clemens.tubach@kit.edu> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #209293|0 |1 is obsolete| | Attachment #209294|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=41306 --- Comment #11 from Clemens Tubach <clemens.tubach@kit.edu> --- Created attachment 209389 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=209389&action=edit Bug 41306: Only offer months in the date picker for running a harvest Harvests run per calendar month: Bug 41294 splits any date range into one job per month, so the exact days asked by the "Run now" dialog were noise. The dialog now asks for a begin month and an end month, sends the first and the last day of those months, and only offers months up to the previous one, since the current month is not complete. The end picker starts at the begin month, through the data-date_to link of the staff date pickers, so a begin month after the end month cannot be picked. Typed input is off: the staff date mask does not accept a month name. The calendars are rendered next to their inputs, inside the modal: a calendar at the end of the body takes the focus out of the modal, and the Bootstrap focus trap then reopens the begin picker after a month is picked in the end picker. The body of the confirmation dialog no longer scrolls, so the calendar overlays the footer. The static calendar wraps its input: the dialog gives the wrapper the width the input had and the input fills it. A read-only picker input keeps the calendar icon instead of the lock of a locked field. The dialog was duplicated in the data providers list and the provider page. It now lives in the composable vue/composables/sushiHarvester.js, which both call; this also fixes the provider name that was undefined in the dialog of the provider page. FlatPickrWrapper gains an optional config prop, merged over the staff flatpickr defaults, so a caller can add a plugin or a bound without losing the defaults. Test plan: 1. On the data providers list, click "Run now": the dialog asks for a begin month and an end month. The inputs show the full month name with a calendar icon, and the end month is prefilled with the previous month 2. Open the begin picker: the current month and later are greyed out. The calendar overlays the dialog footer instead of scrolling the dialog 3. Typing in an input is not possible; a month can only be picked 4. Pick a begin month of last year, then open the end picker: the months before the begin month are greyed out, and a click in the end picker does not reopen the begin picker 5. Pick an end month and click "Yes, run": the message lists one job per report type and month, from the begin month to the end month 6. Open a provider page and click "Run now" there: the dialog names the provider and behaves the same 7. Open the job of the first month: the harvest period runs from the first to the last day of that month 8. yarn cypress run --spec t/cypress/integration/ERM/DataProviders_spec.ts Sponsored-by: Karlsruhe Institute of Technology (KIT) Assisted-by: Fable 5.1 (Anthropic) Signed-off-by: Clemens Tubach <clemens.tubach@kit.edu> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41306 --- Comment #12 from Clemens Tubach <clemens.tubach@kit.edu> --- Created attachment 209390 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=209390&action=edit Bug 41306: Add cypress tests The list test and the provider page test open the "Run now" dialog, check that the dialog asks for months, that the current month is greyed out, pick a month of last year, and check that the request carries the first and the last day of the chosen months. The list test also checks that the end picker greys out the months before the begin month, and that the queued jobs message links to each job. Test plan: yarn cypress run --spec t/cypress/integration/ERM/DataProviders_spec.ts Manual: 1. Open a usage data provider and click "Run now" 2. Check that the current month and later are greyed out in both pickers 3. Pick a begin month, open the end picker: earlier months are greyed out 4. Run and check one job per month and report type in the message Assisted-by: Fable 5.1 (Anthropic) Signed-off-by: Clemens Tubach <clemens.tubach@kit.edu> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41306 Michaela Sieber <michaela.sieber@kit.edu> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=42767 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41306 Lisette Scheer <lisette@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |lucas@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=41306 Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #209389|0 |1 is obsolete| | Attachment #209390|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=41306 --- Comment #13 from Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk> --- Created attachment 210920 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=210920&action=edit Bug 41306: Only offer months in the date picker for running a harvest Harvests run per calendar month: Bug 41294 splits any date range into one job per month, so the exact days asked by the "Run now" dialog were noise. The dialog now asks for a begin month and an end month, sends the first and the last day of those months, and only offers months up to the previous one, since the current month is not complete. The end picker starts at the begin month, through the data-date_to link of the staff date pickers, so a begin month after the end month cannot be picked. Typed input is off: the staff date mask does not accept a month name. The calendars are rendered next to their inputs, inside the modal: a calendar at the end of the body takes the focus out of the modal, and the Bootstrap focus trap then reopens the begin picker after a month is picked in the end picker. The body of the confirmation dialog no longer scrolls, so the calendar overlays the footer. The static calendar wraps its input: the dialog gives the wrapper the width the input had and the input fills it. A read-only picker input keeps the calendar icon instead of the lock of a locked field. The dialog was duplicated in the data providers list and the provider page. It now lives in the composable vue/composables/sushiHarvester.js, which both call; this also fixes the provider name that was undefined in the dialog of the provider page. FlatPickrWrapper gains an optional config prop, merged over the staff flatpickr defaults, so a caller can add a plugin or a bound without losing the defaults. Test plan: 1. On the data providers list, click "Run now": the dialog asks for a begin month and an end month. The inputs show the full month name with a calendar icon, and the end month is prefilled with the previous month 2. Open the begin picker: the current month and later are greyed out. The calendar overlays the dialog footer instead of scrolling the dialog 3. Typing in an input is not possible; a month can only be picked 4. Pick a begin month of last year, then open the end picker: the months before the begin month are greyed out, and a click in the end picker does not reopen the begin picker 5. Pick an end month and click "Yes, run": the message lists one job per report type and month, from the begin month to the end month 6. Open a provider page and click "Run now" there: the dialog names the provider and behaves the same 7. Open the job of the first month: the harvest period runs from the first to the last day of that month 8. yarn cypress run --spec t/cypress/integration/ERM/DataProviders_spec.ts Sponsored-by: Karlsruhe Institute of Technology (KIT) Assisted-by: Fable 5.1 (Anthropic) Signed-off-by: Clemens Tubach <clemens.tubach@kit.edu> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41306 --- Comment #14 from Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk> --- Created attachment 210921 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=210921&action=edit Bug 41306: Add cypress tests The list test and the provider page test open the "Run now" dialog, check that the dialog asks for months, that the current month is greyed out, pick a month of last year, and check that the request carries the first and the last day of the chosen months. The list test also checks that the end picker greys out the months before the begin month, and that the queued jobs message links to each job. Test plan: yarn cypress run --spec t/cypress/integration/ERM/DataProviders_spec.ts Manual: 1. Open a usage data provider and click "Run now" 2. Check that the current month and later are greyed out in both pickers 3. Pick a begin month, open the end picker: earlier months are greyed out 4. Run and check one job per month and report type in the message Assisted-by: Fable 5.1 (Anthropic) Signed-off-by: Clemens Tubach <clemens.tubach@kit.edu> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41306 Michaela Sieber <michaela.sieber@kit.edu> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the| |In the interface, the user release notes| |should likewise only be | |able to select past months, | |since in the background | |Koha only harvests by month | |anyway. | |This way we establish | |consistency between the | |code and the interface. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org