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

Fix sorting in get_aggregates and its documentation (20.08) #1375

Merged

Conversation

timopollmeier
Copy link
Member

@timopollmeier timopollmeier commented Dec 8, 2020

What:
This fixes the sorting by the mean / average of a column and the GMP documentation for the sort element.

Why:
The sorting by mean returned data in the wrong order and the GMP documentation had the wrong attribute names for the sort elements.

How did you test it:
To test the sorting by average, run the following GMP command with gvm-cli:

<get_aggregates type="nvt" group_column="family">
    <data_column>severity</data_column>
    <sort field="severity" stat="mean" order="descending"/>
</get_aggregates>

The documentation was tested by building it and checking the HTML document.

Checklist:

Sorting by the average of a field gave incorrect results.
In the sort elements, the attributes do not have a "sort_" prefix,
e.g. it's "order" instead of "sort_order".
@timopollmeier timopollmeier marked this pull request as ready for review December 8, 2020 14:16
@mattmundell mattmundell merged commit c3857ab into greenbone:gvmd-20.08 Dec 8, 2020
@timopollmeier timopollmeier deleted the get_aggregates-fixes-20.08 branch October 15, 2021 10:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants