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 #20207 - Content Views page shows versions out of order. #6849

Merged
merged 1 commit into from
Jul 6, 2017
Merged

Fixes #20207 - Content Views page shows versions out of order. #6849

merged 1 commit into from
Jul 6, 2017

Conversation

anandkumaragrawal
Copy link
Contributor

No description provided.

@mention-bot
Copy link

@anandkumaragrawal, thanks for your PR! By analyzing the history of the files in this pull request, we identified @bbuckingham, @waldenraines and @parthaa to be potential reviewers.

@theforeman-bot
Copy link

Issues: #20207

@@ -15,7 +15,7 @@ end

node :last_published do |content_view|
unless content_view.versions.empty?
content_view.versions.last.created_at
content_view.versions.order(:major).last.created_at
Copy link
Member

Choose a reason for hiding this comment

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

This will ignore minor versions (which are generated by an incremental update). You could do:

content_view.versions.order(:major).order(:minor).last.created_at
or just:
content_view.versions.order(:created_at).last.created_at

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jlsherrill Thanks for the information. Updated the code as per your suggestion.

@jlsherrill
Copy link
Member

[test]

@jlsherrill
Copy link
Member

ACK thanks @anandkumaragrawal !!

@jlsherrill jlsherrill merged commit 27f1bd9 into Katello:master Jul 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants