Bug #38260
closedKatello host form hooks get attached multiple times
Description
Description of problem:
When organization gets changed in host form, it triggers a ContentLoad event. Katello extensions are hooked onto this event and attach various onChange handlers onto elements on the page. If the organization is changed multiple times, handlers are attached multiple times. This then leads to callbacks being called multiple times and certain elements being populated multiple times.
Steps to Reproduce:
1. Have two organizations
2. Go to Hosts > Create Host
3. Change organization to the other org and back a couple of times
4. Select content source
5. Open the lifecycle environment select
Actual behavior:
The lifecycle environment select offers the same environments many times, depending on how many times the organization was changed in step 3.
Expected behavior:
Each environment is offered only once
Updated by The Foreman Bot about 1 month ago
- Status changed from Assigned to Ready For Testing
- Pull request https://github.com/Katello/katello/pull/11329 added
Updated by Ian Ballou about 1 month ago
- Category set to Hosts
- Triaged changed from No to Yes
Updated by The Foreman Bot 19 days ago
- Pull request deleted (
https://github.com/Katello/katello/pull/11329)
Updated by Oleh Fedorenko 19 days ago
- Status changed from Ready For Testing to Duplicate
Closing as duplicate of https://projects.theforeman.org/issues/38264
Updated by Oleh Fedorenko 19 days ago
- Is duplicate of Bug #38264: Duplicate entries in the "Lifecycle Environment" or "Content View" dropdown menu when creating a host added