Skip to content

Fix the react forms for catalog items#9904

Open
GilbertCherrie wants to merge 2 commits intoManageIQ:masterfrom
GilbertCherrie:fix_catalog_item_react
Open

Fix the react forms for catalog items#9904
GilbertCherrie wants to merge 2 commits intoManageIQ:masterfrom
GilbertCherrie:fix_catalog_item_react

Conversation

@GilbertCherrie
Copy link
Member

@GilbertCherrie GilbertCherrie commented Mar 12, 2026

Fixes an issue where the React catalog item forms (Ansible playbook and Terraform) were breaking due to not receiving the correct ID value. This was broken due to this pr: #9865.

Before:
When you select an Ansible playbook or Terraform template item from the catalog table checkbox and select Configuration / Edit Item, it hits an error.
Screenshot 2026-03-12 at 10 24 34 AM

After:
Screenshot 2026-03-12 at 10 26 07 AM

Comment on lines +2 to +3
- if @checked_id.nil?
- @checked_id = 'new'
Copy link
Member

Choose a reason for hiding this comment

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

Can this be done in the controller?

Copy link
Member Author

Choose a reason for hiding this comment

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

@Fryguy I moved this to the controller file. I tested the add/edit/copy form with all possible entry points into this form and it seems to be working now

@miq-bot
Copy link
Member

miq-bot commented Mar 13, 2026

Checked commits GilbertCherrie/manageiq-ui-classic@c14477b~...732ccef with ruby 3.3.10, rubocop 1.56.3, haml-lint 0.69.0, and yamllint
3 files checked, 6 offenses detected

app/controllers/catalog_controller.rb

app/views/catalog/_st_angular_form.html.haml

  • ⚠️ - Line 2 - Avoid using instance variables in partials views
  • ⚠️ - Line 2 - Line is too long. [240/80]

app/views/catalog/_tt_react_form.html.haml

  • ⚠️ - Line 2 - Avoid using instance variables in partials views
  • ⚠️ - Line 2 - Line is too long. [238/80]

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.

3 participants