@@ -95,10 +95,12 @@ def get_ticket_statistics(
9595 Parameters
9696 ----------
9797 start_date : str | None, optional
98- ISO ``YYYY-MM-DD`` start of the window. Defaults to
99- ``end_date - default_days + 1`` when omitted.
98+ ISO ``YYYY-MM-DD`` start of the window (inclusive from
99+ 00:00:00). Defaults to ``end_date - default_days + 1``
100+ when omitted.
100101 end_date : str | None, optional
101- ISO ``YYYY-MM-DD`` end of the window. Defaults to today.
102+ ISO ``YYYY-MM-DD`` end of the window (inclusive through
103+ 23:59:59). Defaults to today.
102104 default_days : int, optional
103105 Span in days used when ``start_date`` is omitted (defaults
104106 to 30 and must be a positive integer).
@@ -147,9 +149,10 @@ def get_ticket_statistics(
147149 entity_filter = rsql_any_filter (
148150 * (f"entities_id=={ e .id } " for e in entities if e .id is not None )
149151 )
150-
152+ date_filter = f"date_creation=ge={ start .isoformat ()} ;"
153+ date_filter += f"date_creation=le={ end .isoformat ()} 23:59:59"
151154 query = rsql_all_filter (
152- f"date_creation=ge= { start . isoformat () } ;date_creation=le= { end . isoformat () } " ,
155+ date_filter ,
153156 entity_filter ,
154157 extra_filter ,
155158 )
@@ -226,10 +229,12 @@ def get_task_durations(
226229 Parameters
227230 ----------
228231 start_date : str | None, optional
229- ISO ``YYYY-MM-DD`` start of the window. Defaults to
230- ``end_date - default_days + 1`` when omitted.
232+ ISO ``YYYY-MM-DD`` start of the window (inclusive from
233+ 00:00:00). Defaults to ``end_date - default_days + 1``
234+ when omitted.
231235 end_date : str | None, optional
232- ISO ``YYYY-MM-DD`` end of the window. Defaults to today.
236+ ISO ``YYYY-MM-DD`` end of the window (inclusive through
237+ 23:59:59). Defaults to today.
233238 default_days : int, optional
234239 Span in days used when ``start_date`` is omitted (defaults
235240 to 30 and must be a positive integer).
@@ -269,9 +274,8 @@ def get_task_durations(
269274 end_date = end_date ,
270275 default_days = default_days ,
271276 )
272- date_filter = (
273- f"date_creation=ge={ start .isoformat ()} ;date_creation=le={ end .isoformat ()} "
274- )
277+ date_filter = f"date_creation=ge={ start .isoformat ()} ;"
278+ date_filter += f"date_creation=le={ end .isoformat ()} 23:59:59"
275279
276280 entity_filter : str | None = None
277281 if entity_id is not None :
@@ -399,9 +403,11 @@ def get_user_activity(
399403 firstname : str | None, optional
400404 Filter by given name (substring match).
401405 start_date : str | None, optional
402- ISO ``YYYY-MM-DD`` start of the activity window.
406+ ISO ``YYYY-MM-DD`` start of the activity window (inclusive
407+ from 00:00:00).
403408 end_date : str | None, optional
404- ISO ``YYYY-MM-DD`` end of the activity window. Defaults to today.
409+ ISO ``YYYY-MM-DD`` end of the activity window (inclusive
410+ through 23:59:59). Defaults to today.
405411 default_days : int, optional
406412 Span in days used when ``start_date`` is omitted (default 30).
407413
@@ -460,9 +466,8 @@ def get_user_activity(
460466 if u .id is not None
461467 }
462468
463- date_range = (
464- f"date_creation=ge={ start .isoformat ()} ;date_creation=le={ end .isoformat ()} "
465- )
469+ date_range = f"date_creation=ge={ start .isoformat ()} ;"
470+ date_range += f"date_creation=le={ end .isoformat ()} 23:59:59"
466471
467472 users_output : dict [str , UserActivityEntry ] = {}
468473 for uid in resolved_user_ids :
0 commit comments