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

Fixes #38039 - Fix ordering by compliance_[failed|passed|othered] #587

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ofedoren
Copy link
Member

@ofedoren ofedoren force-pushed the bug-38039-fix-ordering branch from 05805fd to dfe3d55 Compare December 2, 2024 14:13
get :index, :params => { :order => "compliance_passed DESC" }, :session => set_session_user
assert_response :success
response = ActiveSupport::JSON.decode(@response.body)
assert_equal 2, response['results'].first['passed']
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We'd expect 15, but due to default scope https://github.com/theforeman/foreman_openscap/blob/master/app/models/foreman_openscap/arf_report.rb#L30, it will always order by latest time creation first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant