Bug #38260
openKatello 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 3 days ago
- Status changed from Assigned to Ready For Testing
- Pull request https://github.com/Katello/katello/pull/11329 added