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

[GAPRINDASHVILI] fixed saving tag name #18386

Merged

Conversation

yrudman
Copy link
Contributor

@yrudman yrudman commented Jan 23, 2019

Issue: Editing tag name on existing record creates new record in Tag table

Fix: Do not create new record in Tag table when editing existing tag

Backport of #18378
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1668730

@miq-bot add-label core, bug, gaprindashvili/yes, hammer/yes

@yrudman yrudman changed the title [WIP] [Gaprindashvili] fixed saving tag name [WIP] [GAPRINDASHVILI] fixed saving tag name Jan 23, 2019
@yrudman
Copy link
Contributor Author

yrudman commented Jan 23, 2019

closed in favor of #18387

@yrudman yrudman closed this Jan 23, 2019
@yrudman yrudman reopened this Jan 24, 2019
@yrudman yrudman changed the title [WIP] [GAPRINDASHVILI] fixed saving tag name [GAPRINDASHVILI] fixed saving tag name Jan 24, 2019
@yrudman
Copy link
Contributor Author

yrudman commented Jan 24, 2019

@miq-bot remove-label hammer/yes

@yrudman yrudman force-pushed the gaprindashvili-fixed-saving-tag-name branch from 5d2d95b to 359f671 Compare January 24, 2019 22:17
@simaishi simaishi self-assigned this Jan 24, 2019
@@ -525,7 +525,12 @@ def find_tag
end

def save_tag
self.tag = Tag.find_or_create_by_classification_name(name, region_id, ns, parent_id)
tag_name = Classification.name2tag(name, parent_id, ns)
Copy link
Member

Choose a reason for hiding this comment

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

Small nit but, couldn't this line be moved into the if block?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sure, it is leftover from my "backporting" from master where tag_name used in else block too

@miq-bot
Copy link
Member

miq-bot commented Jan 24, 2019

Checked commits yrudman/manageiq@00a6a3c~...5512d1c with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0
2 files checked, 0 offenses detected
Everything looks fine. 🏆

@simaishi simaishi merged commit ac3a51e into ManageIQ:gaprindashvili Jan 25, 2019
@simaishi simaishi added this to the Sprint 104 Ending Feb 4, 2019 milestone Jan 25, 2019
@yrudman yrudman deleted the gaprindashvili-fixed-saving-tag-name branch January 25, 2019 20:48
yrudman added a commit to yrudman/manageiq that referenced this pull request Jan 29, 2019
simaishi added a commit that referenced this pull request Jan 29, 2019
@simaishi
Copy link
Contributor

This is now reverted:

commit 5fdf7387539d43ea39031adc8ecb91926855fc33
Author: Satoe Imaishi <simaishi@redhat.com>
Date:   Tue Jan 29 11:47:39 2019 -0500

    Revert "Merge pull request #18386 from yrudman/gaprindashvili-fixed-saving-tag-name"
    
    This reverts commit ac3a51ed367e9be4f6f89d944ec8e3b98f13c889, reversing
    changes made to 5d837f5765bb4a6d28589bd2536d4c7d09547caf.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1668730

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