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

Report-Profile non-functional with organization is current users organization #5176

Open
MrGeneration opened this issue May 16, 2024 · 0 comments

Comments

@MrGeneration
Copy link
Member

Used Zammad Version

6.3.1

Environment

Actual behaviour

You cannot create a dynamic report profile that looks for the users (that looks at the reporting) organization.
It is working fine to provide a specific organization though.

Expected behaviour

As Zammad provides me the option, I am able to have dynamic reportings based on my current organization depending on who looks at the same report.

Response:

Unable to process GET request to elasticsearch URL 'http://127.0.0.1:9200/zp_00011060_production_ticket/_search'. Check the response and payload for detailed information:

Response:
#<UserAgent::Result:0x00007f9cc8f93c08 @success=false, @body="{\"error\":{\"root_cause\":[{\"type\":\"parsing_exception\",\"reason\":\"[terms] query does not support [organization_id]\",\"line\":1,\"col\":183}],\"type\":\"x_content_parse_exception\",\"reason\":\"[1:183] [bool] failed to parse field [must]\",\"caused_by\":{\"type\":\"x_content_parse_exception\",\"reason\":\"[1:183] [bool] failed to parse field [must]\",\"caused_by\":{\"type\":\"x_content_parse_exception\",\"reason\":\"[1:183] [bool] failed to parse field [must]\",\"caused_by\":{\"type\":\"parsing_exception\",\"reason\":\"[terms] query does not support [organization_id]\",\"line\":1,\"col\":183}}}},\"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"=>"565"}>

Payload:
{"size":0,"query":{"bool":{"must":[{"range":{"created_at":{"from":"2024-01-01T00:00:00Z","to":"2024-12-31T23:59:59Z"}}},{"bool":{"must":[{"bool":{"must":[{"terms":{"organization_id":2}}]}},{"bool":{"must_not":[{"term":{"state.name.keyword":"merged"}}]}}]}}]}},"aggs":{"time_buckets":{"date_histogram":{"field":"created_at","calendar_interval":"month","time_zone":"UTC"}}},"sort":[{"updated_at":{"order":"desc"}},"_score"]}

Payload size: 0M

Steps to reproduce the behaviour

  • be a user that is part of an organization
  • create a report profile with just "ticket.organization is current users organization", save
  • go to reporting and try to use the profile.

Support Ticket

No response

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

yes

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

1 participant