Bug 38831

Summary: Datepicker in ERM reports does not take into account dateformat syspref
Product: Koha Reporter: Mathieu Saby <mathsabypro>
Component: ERMAssignee: Jonathan Druart <jonathan.druart>
Status: CLOSED INVALID QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: jonathan.druart, jonathan.field, martin.renvoize, matt.blenkinsop, pedro.amorim
Version: Main   
Hardware: All   
OS: All   
GIT URL: Initiative type: ---
Sponsorship status: --- Comma delimited list of Sponsors:
Crowdfunding goal: 0 Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:

Description Mathieu Saby 2025-01-06 11:22:59 UTC
Datepicker in ERM reports does not take into account dateformat syspref

Ex :
dateformat = jj/mm/aaaa

Date picker for january the 6th : 01/06/2025
Comment 1 Jonathan Field 2025-01-06 11:33:45 UTC
(In reply to Mathieu Saby from comment #0)
> Datepicker in ERM reports does not take into account dateformat syspref
> 
> Ex :
> dateformat = jj/mm/aaaa
> 
> Date picker for january the 6th : 01/06/2025

Can you elaborate on this? The ERM COUNTER data should only be month and year, you don't get ERM data with Day in it. Do you mean at this location cgi-bin/koha/erm/eusage/reports ?
Comment 2 Pedro Amorim 2025-01-06 11:43:53 UTC
I believe all date pickers in ERM utilize the Koha standard flatpickr component, which prompts the user for a 'regular' date, containing day+month+year, even if the functionality does not necessarily require the day to work (e.g. SUSHI queries).
This includes the 'run now' button but I think it is also the case for the custom report builder.

Even though the ERM date pickers may not be considering the dateformat syspref, as Mathieu reported, and that is likely a real issue, we may also want to consider updating the pickers to only prompt for month+year where applicable.
Comment 3 Jonathan Field 2025-01-06 11:45:48 UTC
(In reply to Pedro Amorim from comment #2)
> I believe all date pickers in ERM utilize the Koha standard flatpickr
> component, which prompts the user for a 'regular' date, containing
> day+month+year, even if the functionality does not necessarily require the
> day to work (e.g. SUSHI queries).
> This includes the 'run now' button but I think it is also the case for the
> custom report builder.
> 
> Even though the ERM date pickers may not be considering the dateformat
> syspref, as Mathieu reported, and that is likely a real issue, we may also
> want to consider updating the pickers to only prompt for month+year where
> applicable.

But I don't see a date picker at all on the Usage statistics reports form. Just an input box, that's why I was confused. But maybe I'm looking in the wrong place and have mis-understood the question?
Comment 4 Pedro Amorim 2025-01-06 12:09:25 UTC
(In reply to Jonathan Field from comment #3)
> But I don't see a date picker at all on the Usage statistics reports form.

You're right, I don't either. On the reports form it asks for year and month distinctly in different inputs, no flatpickr is used that I can see.

Perhaps this is only related to the date pickers in the dialog box shown once the 'run now' button is clicked from the data providers list.
Comment 5 Mathieu Saby 2025-01-06 12:15:28 UTC
I meant "input box"
Comment 6 Mathieu Saby 2025-01-14 06:12:33 UTC
I believe my tests were wrong, I cannot reproduce my issue...