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

Fixes Service Catalog Item Custom subtype display #3809

Merged
merged 1 commit into from
Apr 23, 2018

Conversation

GregP
Copy link
Contributor

@GregP GregP commented Apr 19, 2018

Fixes default display of "Custom" Service Catalog Item Subtype when value is not set upon creation/edit.

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

Screen shot post code fix:
catalog item with custom subtype post code fix

@GregP
Copy link
Contributor Author

GregP commented Apr 19, 2018

@miq-bot add-label gaprindashvili/yes

@GregP
Copy link
Contributor Author

GregP commented Apr 19, 2018

@miq-bot add-label fine/yes

@miq-bot
Copy link
Member

miq-bot commented Apr 19, 2018

Checked commit GregP@367af3f with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0
1 file checked, 1 offense detected

**

  • 💣 💥 🔥 🚒 - Linter/Haml - Linter::Haml STDERR:
warning: parser/current is loading parser/ruby23, which recognizes
warning: 2.3.6-compliant syntax, but you are running 2.3.3.
warning: please see https://github.com/whitequark/parser#compatibility-with-ruby-mri.

@mzazrivec
Copy link
Contributor

ServiceTemplate::GENERIC_ITEM_SUBTYPES already contains "custom" => _("Custom"), so = h(ServiceTemplate::GENERIC_ITEM_SUBTYPES[@edit[:new][:generic_subtype]]) should render it, unless there's something else going on.

i.e. we should figure out why in this particular case (and maybe with that particular version) would the UI not see the custom subtype, rather than doing work arounds.

@GregP
Copy link
Contributor Author

GregP commented Apr 20, 2018

@mzazrivec Because one can create a Generic service without Subtype.

@mzazrivec
Copy link
Contributor

@GregP How exactly can I create a generic catalog item without subtype?

@h-kataria h-kataria self-assigned this Apr 23, 2018
@h-kataria
Copy link
Contributor

@mzazrivec not sure how the customer got into that state, but this fix will just safeguard the scenario where user has old Catalog Items with no subtype selected. We do the same in the Catalog Item edit form as well, where if it is not populated we default it to "custom"

@h-kataria h-kataria added this to the Sprint 84 Ending Apr 23, 2018 milestone Apr 23, 2018
@h-kataria h-kataria merged commit 1387e2a into ManageIQ:master Apr 23, 2018
@mzazrivec
Copy link
Contributor

@h-kataria Can you please point me to the part of catalog item edit form code where we default the item subtype to custom? Thanks.

simaishi pushed a commit that referenced this pull request Apr 23, 2018
@simaishi
Copy link
Contributor

Gaprindashvili backport details:

$ git log -1
commit 074687b90a5eeb3751be81efe7a4d773f2d48bcc
Author: Harpreet Kataria <[email protected]>
Date:   Mon Apr 23 11:07:12 2018 -0400

    Merge pull request #3809 from GregP/cat_item_custom_subtype_display
    
    Fixes Service Catalog Item Custom subtype display
    (cherry picked from commit 1387e2aeee9955ea172c47437813a6d4213f9da9)
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1570989

simaishi pushed a commit that referenced this pull request Apr 23, 2018
@simaishi
Copy link
Contributor

Fine backport details:

$ git log -1
commit c67ff60712d6680120f4b4d22460fd19cd21b611
Author: Harpreet Kataria <[email protected]>
Date:   Mon Apr 23 11:07:12 2018 -0400

    Merge pull request #3809 from GregP/cat_item_custom_subtype_display
    
    Fixes Service Catalog Item Custom subtype display
    (cherry picked from commit 1387e2aeee9955ea172c47437813a6d4213f9da9)
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1570990

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