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

Catalog item copied with space in front of original name does not show space in copy. #7596

Open
dmetzger57 opened this issue Jan 22, 2021 · 6 comments

Comments

@dmetzger57
Copy link

Original BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1740390

Description of problem:
Spaces are accepted as leading characters when cloning a catalog item (or bundle), but not displayed in the name. This can lead to multiple items having the same names.

Version-Release number of selected component (if applicable):
cfme-5.11.0.18-1.el8cf.x86_64

How reproducible:
Everytime

Steps to Reproduce:
"1. Create some Catalog Item if there is no one,
check Display in Catalog Item checkbox and choose some Catalog from the drop down
2. Configuration > Copy Selected item, click on Add
=> check Basic Info of the copy and you can see that ""Catalog"" with the specified name is missing

Expected results:
Leading spaces not accepted or Leading spaces displayed in the name field.

@dmetzger57 dmetzger57 added the bug label Jan 22, 2021
@Fryguy
Copy link
Member

Fryguy commented Jan 22, 2021

@agrare :trollface:

@agrare
Copy link
Member

agrare commented Jan 25, 2021

So as a mixture of "the customer is always right" and "if it is stupid but works, it isn't stupid" I'd like to coin:

"If it is stupid but customers do it, it isn't stupid" - @agrare

@chessbyte
Copy link
Member

I suggest that we trim leading and trailing whitespace in any parameters that can be used in queries and/or uniqueness constraints

@GilbertCherrie
Copy link
Member

GilbertCherrie commented Jun 1, 2022

@Fryguy Not sure if this is a bug or not but when catalog items have Display set to true it displays the catalog name for the copy, but when making a copy of a catalog item the Display value is always set to false in this line: https://github.com/ManageIQ/manageiq/blob/abfad1e3e84f1969b9eb55ac2ca9c233d2d601b9/app/models/service_template/copy.rb#L9.

Screen Shot 2022-06-01 at 1 02 49 PM

I was thinking if this is a bug and want the catalog name of the copy to be displayed if the original has it displayed then we can change the line to
template.update!(:name => new_name, :display => template.display, :options => {:button_order => []})

Let me know what you think of this change and I can get this pr up if needed.

@Fryguy
Copy link
Member

Fryguy commented Jun 1, 2022

when making a copy of a catalog item the Display value is always set to false in this line

That is very much intentional. "Display in catalog" is like "published", however many times when people copy a catalog item, they are in development of it, and don't want to publish it just yet. This prevents accidental publishing of in-development catalog items.

@miq-bot
Copy link
Member

miq-bot commented Feb 27, 2023

This issue has been automatically marked as stale because it has not been updated for at least 3 months.

If you can still reproduce this issue on the current release or on master, please reply with all of the information you have about it in order to keep the issue open.

Thank you for all your contributions! More information about the ManageIQ triage process can be found in the triage process documentation.

@miq-bot miq-bot added the stale label Feb 27, 2023
@Fryguy Fryguy removed the stale label Mar 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants