Project

General

Profile

Actions

Bug #25934

closed

Bug #25727: Locale issue: date picker should be in yyyy/MM/dd in group criteria

Search is not able to parse new format

Added by François ARMAND about 1 month ago. Updated 24 days ago.

Status:
Released
Priority:
N/A
Category:
Web - Nodes & inventories
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
0
Name check:
To do
Fix check:
Checked
Regression:
No

Description

024-11-21 21:29:22+0100 DEBUG query.node-fact - (only matches node and relay) && ([node.inventoryDate eq 2015-01-21])
2024-11-21 21:29:22+0100 DEBUG query.node-fact -   --'node18.rudder.local' (00000018-55a2-4b97-8529-5154cbb63a18)--
2024-11-21 21:29:22+0100 TRACE query.node-fact -     [true] for only matches node and relay on 'Node'
2024-11-21 21:29:22+0100 TRACE query.node-fact -     - '2015-01-21' can not be parsed into correct type: false'
Actions #1

Updated by François ARMAND about 1 month ago

  • Status changed from New to In progress
  • Assignee set to François ARMAND
Actions #2

Updated by François ARMAND about 1 month ago

  • Status changed from In progress to Pending technical review
  • Assignee changed from François ARMAND to Clark ANDRIANASOLO
  • Pull Request set to https://github.com/Normation/rudder/pull/6037
Actions #3

Updated by Anonymous about 1 month ago

  • Status changed from Pending technical review to Pending release
Actions #4

Updated by Clark ANDRIANASOLO 27 days ago

  • Fix check changed from To do to Error - Blocking

Now it works with yyyy-MM-dd and dd-MM-yyyy, but not with yyyy/MM/dd !

Working example with yyyy-MM-dd :

>>> curl -kg --header "X-API-Token: $(cat /var/rudder/run/api-token)" 'https://localhost/rudder/api/latest/nodes?where=[{"objectType":"node","attribute":"inventoryDate","comparator":"lt","value":"2024-12-31"}]' --silent | jq '.data.nodes | length'
1

logs :
2024-11-26 14:06:39+0300 DEBUG query.node-fact - (only matches node and relay) && ([node.inventoryDate lt 2024-12-31])
2024-11-26 14:06:39+0300 DEBUG query.node-fact -   --'RUDDERTEST1' (e98a11f8-7516-4775-b51f-69532733e815)--
2024-11-26 14:06:39+0300 TRACE query.node-fact -     [true] for only matches node and relay on 'Node'
2024-11-26 14:06:39+0300 TRACE query.node-fact -     [true] for 'lt 2024-12-31' on [2019-06-01T00:00:00+03:00]
2024-11-26 14:06:39+0300 DEBUG query.node-fact -   = [true] on 'RUDDERTEST1' (e98a11f8-7516-4775-b51f-69532733e815)

And NON-WORKING example with yyyy/MM/dd :

>>> curl -kg --header "X-API-Token: $(cat /var/rudder/run/api-token)" 'https://localhost/rudder/api/latest/nodes?where=[{"objectType":"node","attribute":"inventoryDate","comparator":"lt","value":"2024/12/31"}]' --silent | jq '.data.nodes | length'
0

logs:
2024-11-26 14:06:01+0300 DEBUG query.node-fact - (only matches node and relay) && ([node.inventoryDate lt 2024/12/31])
2024-11-26 14:06:01+0300 DEBUG query.node-fact -   --'RUDDERTEST1' (e98a11f8-7516-4775-b51f-69532733e815)--
2024-11-26 14:06:01+0300 TRACE query.node-fact -     [true] for only matches node and relay on 'Node'
2024-11-26 14:06:01+0300 TRACE query.node-fact -     - '2024/12/31' can not be parsed into correct type: false'
2024-11-26 14:06:01+0300 DEBUG query.node-fact -   = [false] on 'RUDDERTEST1' (e98a11f8-7516-4775-b51f-69532733e815)

Actions #5

Updated by Clark ANDRIANASOLO 27 days ago

  • Fix check changed from Error - Blocking to Checked

yyyy/MM/dd was never meant to be supported, we support the format resembling ISO8601 which is yyyy-MM-dd, checked !

Actions #6

Updated by Vincent MEMBRÉ 24 days ago

  • Status changed from Pending release to Released

This bug has been fixed in Rudder 8.1.9 and 8.2.2 which were released today.

Actions

Also available in: Atom PDF