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 mismatching categories with values when assigning tags #3644

Merged
merged 3 commits into from
Mar 27, 2018

Conversation

hstastna
Copy link

@hstastna hstastna commented Mar 19, 2018

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

Partially caused by:
[1] ManageIQ/manageiq#5598
[2] ManageIQ/manageiq#9234

Done:

Notes:

  • this bug occurred everywhere where tagging is supported
  • it was not easy to reproduce the bug, but after deleting some category (I deleted some of the first categories from my tagging categories) the bug occurred

Before:
tag_category_before
tag_category_before2

After:
tag_category_after

Hilda Stastna added 3 commits March 19, 2018 11:24
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1556984

Fix sorting of categories by description for assigning tags so that
downcase method is added, to sort items of the array properly.
Fix setting @edit[:cat] to first category when assigning tags so that
'min_by' method is replaced by 'first' method, to really get the first
item of the categories' array.
Remove sorting of the array with categories for assigning tags from haml
as it no longer makes sense to be there because proper sorting is already
implemented in tag_edit_build_screen method.
@miq-bot miq-bot added the wip label Mar 19, 2018
@hstastna
Copy link
Author

@miq-bot add_label bug

@miq-bot miq-bot added the bug label Mar 19, 2018
@miq-bot
Copy link
Member

miq-bot commented Mar 19, 2018

Checked commits hstastna/manageiq-ui-classic@02bc49c~...de0f009 with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0
1 file checked, 0 offenses detected
Everything looks fine. ⭐

@hstastna hstastna changed the title [WIP] Fix mismatching categories with values when assigning tags Fix mismatching categories with values when assigning tags Mar 19, 2018
@hstastna
Copy link
Author

@miq-bot remove_label wip

@miq-bot miq-bot removed the wip label Mar 19, 2018
@ZitaNemeckova
Copy link
Contributor

Tested in UI. LGTM 👍Nice fix 👍

@himdel himdel self-assigned this Mar 27, 2018
@himdel himdel merged commit 392d5f3 into ManageIQ:master Mar 27, 2018
@himdel
Copy link
Contributor

himdel commented Mar 27, 2018

LGTM, hashes should follow insertion order in ruby 1.9+ so we can do this 👍

@himdel himdel added this to the Sprint 83 Ending Apr 9, 2018 milestone Mar 27, 2018
@hstastna
Copy link
Author

@miq-bot add_label gaprindashvili/yes

simaishi pushed a commit that referenced this pull request Mar 27, 2018
Fix mismatching categories with values when assigning tags
(cherry picked from commit 392d5f3)

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

Gaprindashvili backport details:

$ git log -1
commit 3b9d0d6e014f3e09f2c5813c31351d9d76abc273
Author: Martin Hradil <himdel@seznam.cz>
Date:   Tue Mar 27 11:39:00 2018 +0000

    Merge pull request #3644 from hstastna/Default_selected_tag_mismatch
    
    Fix mismatching categories with values when assigning tags
    (cherry picked from commit 392d5f38d233684d9abf81315edc03830992381a)
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1561096

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.

5 participants