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

Ensure order is qualified by table name for rss feeds #15112

Merged
merged 1 commit into from
May 17, 2017

Conversation

imtayadeway
Copy link
Contributor

BEFORE:

SELECT "vms"."id" [...] ORDER BY created_on DESC

This is problematic because if we later join another table to this
scope and execute the query, if that table has a created_on field
Postgres will complain and throw an error for the ambiguous statement.

AFTER:

SELECT "vms"."id" [...] ORDER BY "vms"."created_on" DESC

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1451180

Note: I tried to bisect but had great difficulty (because you need to check out all the git gems to be concurrent with the revision you're checking out in core), but since this seemed to be a good idea anyway (and works), I was satisfied.

@miq-bot add-label bug, core
@miq-bot assign @gtanzillo

BEFORE:

```
SELECT "vms"."id" [...] ORDER BY created_on DESC
```

This is problematic because if we later join another table to this
scope and execute the query, if that table has a `created_on` field
Postgres will complain and throw an error for the ambiguous statement.

AFTER:

```
SELECT "vms"."id" [...] ORDER BY "vms"."created_on" DESC
```

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1451180
@miq-bot
Copy link
Member

miq-bot commented May 16, 2017

Checked commit imtayadeway@74ec0da with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0
0 files checked, 0 offenses detected
Everything looks fine. 🍪

@imtayadeway
Copy link
Contributor Author

@miq-bot add-label blocker

Copy link
Member

@gtanzillo gtanzillo left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@gtanzillo gtanzillo added this to the Sprint 61 Ending May 22, 2017 milestone May 17, 2017
@gtanzillo gtanzillo merged commit 0974ffc into ManageIQ:master May 17, 2017
simaishi pushed a commit that referenced this pull request May 17, 2017
Ensure order is qualified by table name for rss feeds
(cherry picked from commit 0974ffc)

https://bugzilla.redhat.com/show_bug.cgi?id=1451925
@simaishi
Copy link
Contributor

Fine backport details:

$ git log -1
commit a4bf78fc24c566cc3f2834cbc0d5ac5c84cacdac
Author: Gregg Tanzillo <[email protected]>
Date:   Wed May 17 14:50:23 2017 -0400

    Merge pull request #15112 from imtayadeway/fix/rss-feeds
    
    Ensure order is qualified by table name for rss feeds
    (cherry picked from commit 0974ffc67358219e47e27f08976c85eccf6a3986)
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1451925

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.

4 participants