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

Check :sort_by: :none to keep the field values in the order that they are inserted in the file. #1248

Merged
merged 1 commit into from
May 3, 2017

Conversation

lfu
Copy link
Member

@lfu lfu commented May 3, 2017

@@ -258,6 +258,8 @@
- opts = multiple ? [] : [["<#{_('None')}>", nil]]
- if field_hash[:data_type] == :integer
- opts += Array(field_hash[:values].invert).sort_by(&:last)
- elsif field_hash[:sort_by] == :none
Copy link
Member

Choose a reason for hiding this comment

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

@lfu Wouldn't you want this to be the first check? Otherwise and integer field could never support a sort_by value of :none.

@lfu lfu force-pushed the dialog_field_sort_none_1389010 branch from 4f5bd47 to d28172e Compare May 3, 2017 19:55
@miq-bot
Copy link
Member

miq-bot commented May 3, 2017

Checked commit lfu@d28172e with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0
1 file checked, 1 offense detected

app/views/miq_request/_prov_field.html.haml

  • ⚠️ - Line 259 - Use the return of the conditional for variable assignment and comparison.

@lfu
Copy link
Member Author

lfu commented May 3, 2017

@miq-bot add_label bug, euwe/yes, fine/yes

@dclarizio dclarizio requested a review from h-kataria May 3, 2017 20:45
@dclarizio dclarizio self-assigned this May 3, 2017
@h-kataria
Copy link
Contributor

test failure is unrelated to changes in this PR.

@dclarizio dclarizio merged commit 662b026 into ManageIQ:master May 3, 2017
@dclarizio dclarizio added this to the Sprint 60 Ending May 8, 2017 milestone May 3, 2017
@simaishi
Copy link
Contributor

Euwe backport (to manageiq repo) details:

$ git log -1
commit e239b5144be9b237589d9c7bf8f8917b25f84acd
Author: Dan Clarizio <[email protected]>
Date:   Wed May 3 14:43:01 2017 -0700

    Merge pull request #1248 from lfu/dialog_field_sort_none_1389010
    
    Check :sort_by: :none to keep the field values in the order that they are inserted in the file.
    (cherry picked from commit 662b0267a5d4ca6ba9d99c09dbed1c8d911fbec9)
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1449403

simaishi pushed a commit that referenced this pull request Jun 5, 2017
Check :sort_by: :none to keep the field values in the order that they are inserted in the file.
(cherry picked from commit 662b026)

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

simaishi commented Jun 5, 2017

Fine backport details:

$ git log -1
commit 7656be54865caaceb8075a2fa2bb145f42b10706
Author: Dan Clarizio <[email protected]>
Date:   Wed May 3 14:43:01 2017 -0700

    Merge pull request #1248 from lfu/dialog_field_sort_none_1389010
    
    Check :sort_by: :none to keep the field values in the order that they are inserted in the file.
    (cherry picked from commit 662b0267a5d4ca6ba9d99c09dbed1c8d911fbec9)
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1458447

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.

6 participants