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

Result does not sort correctly with Multiple OrderBy #128

Closed
divya-sea opened this issue Nov 14, 2022 · 3 comments · Fixed by #129
Closed

Result does not sort correctly with Multiple OrderBy #128

divya-sea opened this issue Nov 14, 2022 · 3 comments · Fixed by #129
Assignees
Labels
type/bug Something isn't working
Milestone

Comments

@divya-sea
Copy link
Contributor

1. Steps:
    1. Select a component, and enter property group / selected properties / filter. 
    2. Add multiple order by and run query
2. Error:
    1. Response on the plugin is not sorted based on the order of the OrderBy.
    2. Example add first order as x and second order as Y.
    3. Display on the panel order is based on Y but not on X.
    4. We need to add a logic sort based on the order of the OrderBy.
@divya-sea divya-sea added the type/bug Something isn't working label Nov 14, 2022
@toddtreece toddtreece self-assigned this Nov 15, 2022
@toddtreece toddtreece changed the title Result does not sort correctly with Multiple OrderBy. (HIGH) Result does not sort correctly with Multiple OrderBy Nov 15, 2022
@toddtreece toddtreece added this to the 2022-11-17 milestone Nov 15, 2022
@toddtreece
Copy link
Member

toddtreece commented Nov 15, 2022

closing this one, but please reopen if i am misunderstanding something. as far as i can tell this seems to be an API bug. here's the request the plugin is sending:

{
    "componentName": "TabularComponent",
    "entityId": "<redacted>",
    "maxResults": 200,
    "propertyGroupName": "tabularPropertyGroup",
    "selectedProperties": [
        "total",
        "crit"
    ],
    "tabularConditions": {
        "orderBy": [
            {
                "order": "ASCENDING",
                "propertyName": "total"
            },
            {
                "order": "ASCENDING",
                "propertyName": "total"
            }
        ]
    }
}

here's the truncated response with incorrect sorting for crit values:

{
    "propertyValues": {},
    "tabularPropertyValues": [
        [
            {
                "crit": {
                    "integerValue": 4
                },
                "total": {
                    "integerValue": 0
                }
            },
            {
                "crit": {
                    "integerValue": 5
                },
                "total": {
                    "integerValue": 0
                }
            },
            {
                "crit": {
                    "integerValue": 4
                },
                "total": {
                    "integerValue": 0
                }
            }
        ]
    ]
}

@toddtreece
Copy link
Member

scratch that, i think i found the issue. it seems to be a state issue on the frontend that is causing duplicate property names to be sent in the request:

           {
                "order": "ASCENDING",
                "propertyName": "total"
            },
            {
                "order": "ASCENDING",
                "propertyName": "total"
            }

@toddtreece
Copy link
Member

fixed by #129

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants