Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IllegalArgumentException on reports with time range in report profile and time selection in the report UI #5105

Closed
MarkusHeld opened this issue Apr 2, 2024 · 1 comment

Comments

@MarkusHeld
Copy link

MarkusHeld commented Apr 2, 2024

Used Zammad Version

6.2

Environment

  • Installation method: SaaS
  • Operating system (if you're unsure: cat /etc/os-release ): any
  • Database + version: any
  • Elasticsearch version: 7.xx
  • Browser + version: any

Actual behaviour

Then i create a report profile wit a time range condition for example „within last(relative) 7 Month(s) and will now create a report with this profie for a time selection 2022 i get an error StatusCode: 500

image_issue1

Bildschirmfoto 2024-04-02 um 11 11 00

production.log error

Unable to process GET request to elasticsearch XXXX Check the response and payload for detailed information:

Response:
#<UserAgent::Result:0x00007fe380a05a80 @success=false, @Body="{"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"[1687624163083] must be <= [1672527599999]"}],"type":"search_phase_execution_exception","reason":"all shards failed","phase":"query","grouped":true,"failed_shards":[{"shard":0,"index\“:\“xxx\“,\“node":"TktsbBLoR-Whghv5cCzXmg","reason":{"type":"illegal_argument_exception","reason":"[1687624163083] must be <= [1672527599999]"}}],"caused_by":{"type":"illegal_argument_exception","reason":"[1687624163083] must be <= [1672527599999]","caused_by":{"type":"illegal_argument_exception","reason":"[1687624163083] must be <= [1672527599999]"}}},"status":400}", @DaTa=nil, @code="400", @content_type=nil, @error="Client Error: #<Net::HTTPBadRequest 400 Bad Request readbody=true>!", @Header={"x-elastic-product"=>"Elasticsearch", "content-type"=>"application/json; charset=UTF-8", "content-length"=>"643"}>

Payload:
{"size":0,"query":{"bool":{"must":[{"range":{"created_at":{"from":"2021-12-31T23:00:00Z","to":"2022-12-31T22:59:59Z"}}},{"bool":{"must":[{"bool":{"must":[{"wildcard":{"article.subject.keyword":"Fehlender Artikel"}}]}},{"bool":{"must":[{"wildcard":{"article.body.keyword":"Kundennummer"}}]}},{"bool":{"must":[{"range":{"created_at":{"gte":"now-7M"}}}]}},{"bool":{"must_not":[{"term":{"state.name.keyword":"merged"}}]}}]}}]}},"aggs":{"time_buckets":{"date_histogram":{"field":"created_at","calendar_interval":"month","time_zone":"Europe/Berlin"}}},"sort":[{"updated_at":{"order":"desc"}},"_score"]}

Maybe this Elasticsearch Isse could be the reason for this behavior
elastic/elasticsearch#88131

Expected behaviour

Maybe create an empty list

Steps to reproduce the behaviour

  • create a report profile with a time selector "Created at "within last (relative) 7 Mont(s)"
  • go to the reports UI and select the report with time selection "2022"

Support Ticket

Ticket#10153025

I'm sure this is a bug and no feature request or a general question.

yes

@mgruner
Copy link
Collaborator

mgruner commented May 2, 2024

Fixed for develop by 5662043

@mgruner mgruner closed this as completed May 2, 2024
zammad-sync pushed a commit that referenced this issue May 2, 2024
… report profile and time selection in the report UI
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants