-
Notifications
You must be signed in to change notification settings - Fork 357
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 displaying multiple Catalogs with the same name in the dropdown while creating a Catalog Item #4278
Fix displaying multiple Catalogs with the same name in the dropdown while creating a Catalog Item #4278
Conversation
@miq-bot add_label bug, gaprindashvili/yes, fine/yes |
0f71300
to
291bf5e
Compare
@h-kataria I've found some solution for the BZ, not sure if it looks good (but it works well). Anyway, I have a question: do we want to fix the problem according to the one specific situation - while only Ansible Playbook as a Catalog Item Type is chosen? I did it so because of description in the BZ but.. don't we want the same change also for another types? Because I was able to create such catalogs so then.. see the screenshot (editing some Catalog Item of some other type): |
291bf5e
to
59140d4
Compare
@hstastna it should be changed for both Ansible and non-Ansible type Catalog Items to keep it consistent. |
e5bceea
to
1df2b0a
Compare
@h-kataria I've made small changes in this PR, to fix the problem for both Ansible and non-Ansible type Catalog Items. It works for editing and also adding new Catalog Items, also for Catalog Bundles :) |
@h-kataria Are you OK with the above changes? @hstastna Could you please address the codeclimate issues? Thanks. |
Thanks, @mzazrivec I will update the PR asap resolving codeclimate issues. |
1df2b0a
to
75719c2
Compare
90c2472
to
aae8173
Compare
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1451300 Add new method available_catalogs for getting all the available catalogs with the names containing tenant names and their ancestors to prevent displaying catalogs with the same name in the dropdown menu while creating a Catalog Item or Catalog Bundle.
Pass the variable for editing catalogs' names to be able to display also tenants and their ancestors names in the drop down menu while creating a new Catalog Item.
Edit name of each catalog to get tenants and their ancestors names in the name of the catalog in the drop down menu.
This is related to the different Catalog Item types than Ansible Playbook.
979c38d
to
8f34d8b
Compare
Update specs according to changes in Catalog names while creating Catalog Item
8f34d8b
to
28d90af
Compare
Checked commits hstastna/manageiq-ui-classic@bde7cb5~...28d90af with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0 |
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1451300
Steps to reproduce:
(or also any other type, but the BZ is mainly about Ansible Playbook type)
Before: (multiple Catalogs with the same name in the dropdown)
Adding a new Service Catalog Item:
Editing an existing Catalog Item - similar problem as the picture above
After:
Adding a new Service Catalog Item:
Editing an existing Catalog Item:
This PR:
available_catalogs
for getting all the available catalogs with the names containing tenant names and their ancestors (if they exist) to prevent displaying multiple catalogs with the same name in the dropdown menu while creating/editing a Catalog Item or also Catalog Bundle because the same problems occurs also there