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

[Bug] Dashboard max aggregation on custom-integer field does not work #1662

Closed
crackytsi opened this issue Nov 18, 2020 · 3 comments
Closed
Assignees
Labels
bug scope:dashboards TheHive4 TheHive4 related issues
Milestone

Comments

@crackytsi
Copy link

Request Type

Bug

Work Environment

Question Answer
OS version (server) Debian
OS version (client) 10
TheHive version / git hash 4.0.1
Package Type DEB

Problem Description

Aggregation of max based on an integer field in multi-lines dashboard does not work.

Steps to Reproduce

  1. Create an integer custom-field
  2. set this integer custom field on a case to a value
  3. define a dashboard using multi-lines
    4 define a series:
    image
  4. Result: Failed to fetch data.
@crackytsi crackytsi added TheHive4 TheHive4 related issues bug labels Nov 18, 2020
@nadouani nadouani self-assigned this Nov 18, 2020
@nadouani
Copy link
Contributor

Thanks @crackytsi we will try to fix it in 4.0.2.

@nadouani
Copy link
Contributor

@To-om here is dashboard that allows to reproduce the issue

Issue_#1662.json.txt

@nadouani nadouani added this to the 4.0.2 milestone Nov 18, 2020
@nadouani
Copy link
Contributor

Here are the details of the issue:

POST /api/alert/_stats

{
    "query": {},
    "stats": [{
        "_agg": "time",
        "_fields": ["createdAt"],
        "_interval": "1d",
        "_select": [{
            "_agg": "max",
            "_name": "agg_1",
            "_query": {},
            "_field": "customFields.csirts"
        }]
    }]
}

returns

{
    "type": "java.lang.ClassCastException",
    "message": "java.util.LinkedHashMap cannot be cast to java.lang.Comparable"
}

@nadouani nadouani removed their assignment Nov 18, 2020
To-om added a commit that referenced this issue Nov 18, 2020
@To-om To-om closed this as completed Nov 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug scope:dashboards TheHive4 TheHive4 related issues
Projects
None yet
Development

No branches or pull requests

3 participants