-
Notifications
You must be signed in to change notification settings - Fork 356
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
Make Add button respond properly on changes while adding Catalog Item #5472
Merged
h-kataria
merged 2 commits into
ManageIQ:master
from
hstastna:Add_button_enabled_Service_Catalog_Item
Jul 30, 2019
Merged
Make Add button respond properly on changes while adding Catalog Item #5472
h-kataria
merged 2 commits into
ManageIQ:master
from
hstastna:Add_button_enabled_Service_Catalog_Item
Jul 30, 2019
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@miq-bot add_label bug |
7774f13
to
c24ab09
Compare
c24ab09
to
6db1e07
Compare
85f984e
to
2ac5861
Compare
79c28cc
to
59a4b8a
Compare
59a4b8a
to
60ea017
Compare
6cfbded
to
ce1971c
Compare
4331525
to
42fbd1e
Compare
f1ad645
to
7f94d26
Compare
784ddce
to
5941db2
Compare
@miq-bot add_label ivanchuk/yes |
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1728774 Also add new copy_params_if_present method to params helper
Add specs for setting initialized values for entry points, dialog id, @edit when saving Catalog Item or choosing Catalog Item type.
5941db2
to
d77e21c
Compare
Checked commits hstastna/manageiq-ui-classic@d3c3878~...d77e21c with ruby 2.4.6, rubocop 0.69.0, haml-lint 0.20.0, and yamllint 1.10.0 |
@miq-bot add_reviewer @romanblanco |
verified fix, looks good. |
h-kataria
approved these changes
Jul 30, 2019
simaishi
pushed a commit
that referenced
this pull request
Jul 30, 2019
…alog_Item Make Add button respond properly on changes while adding Catalog Item (cherry picked from commit 9ecceb4) https://bugzilla.redhat.com/show_bug.cgi?id=1728774
Ivanchuk backport details:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes BZ:
https://bugzilla.redhat.com/show_bug.cgi?id=1728774
Issue:
#5469
What:
Add button is already (always) enabled while adding a new Service Catalog Item, even when there is nothing to add, because we haven't filled in anything. This behavior is not consistent with other screens. We want Add button to properly response on changes, as in other screens.
How:
When user fills in some form, the text for the appropriate form is stored in
@edit[:new]
where the original values are usually set tonil
. The same values are copied to@edit[:current]
in the beginning. If the user deletes the text from the form, the variable is set to""
which is different to the original value, so thechanged
variable stilll 'detects' the change even when there is no change according to the original value (nil
). So I am adding new common methodcopy_params_if_present
which deals with""
vsnil
values.Note:
This PR fixes response of Add button on changes (bot adding and editing Catalog Item), except Long Description. This is more complicated and requires different fix (Also not sure how this should work - issue: #5853).
Before: (when first time in for adding new Catalog Item, Add button already enabled!)
![add_issue](https://user-images.githubusercontent.com/13417815/56348844-9ce2b480-61c7-11e9-9434-8ae9c74ca6ac.png)
After: (when first time in for adding new Catalog Item, Add button disabled, there is nothing to add)
![catitem_after](https://user-images.githubusercontent.com/13417815/61222195-8098da00-a71a-11e9-9c6a-ff78aef6834d.png)