Bug 2213447

Summary: Remove API for changing content view + lifecycle environment organizations
Product: Red Hat Satellite Reporter: Shweta Singh <shwsingh>
Component: Content ViewsAssignee: Samir Jha <sajha>
Status: CLOSED NOTABUG QA Contact: Satellite QE Team <sat-qe-bz-list>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.14.0CC: iballou, rlavi, sajha
Target Milestone: UnspecifiedKeywords: Triaged, UserExperience
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-08-16 15:27:02 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Shweta Singh 2023-06-08 07:51:16 UTC
Description of problem:
Missing support to update organization in a content-view and lifecycle-environment through Web UI. Same is present via hammer.

Version-Release number of selected component (if applicable):
6.13.0
6.14.0

How reproducible:
Always

Steps to Reproduce:
1.Navigate to Web UI and create a content-view or a lifecycle-environment
2.Create an organization 
3.Try to update content-view or lifecycle-environment with new organization through UI.

Actual results:
We don't have option to update the organization through UI but same is available via hammer.

Expected results:
We should be able to update organization through any interface and it will more user-friendly.

Additional info:

Comment 3 Ian Ballou 2023-06-12 14:56:01 UTC
I'm guessing that changing a CVs org doesn't update things like the distribution path -- so we shouldn't be allowing this at all. I'd recommend that we first deprecate the API and then remove it in the next Katello release.

Comment 4 Ian Ballou 2023-06-12 14:59:34 UTC
Not only would the distribution paths be wrong, but the related repositories would also not exist, causing all sorts of CV-related errors.  Changing the title.

Comment 5 Samir Jha 2023-08-14 16:41:53 UTC
Created redmine issue https://projects.theforeman.org/issues/36680 from this bug

Comment 6 Samir Jha 2023-08-15 02:36:40 UTC
Hi Shweta,

The organization-id params in hammer commands when updating CV or env or other records are present to allow for scoping search of the resource by name to provided organization. The organization itself is not updated/affected if you pass a new value to it as it's not an update param for the call, rather a search param to locate the resource. The Org id is needed for these calls to support searching by name or label on different resources which generally are unique only to an organization. If you use Id of resource to target a resource, the organization-id is ignored by the API as id is a sufficient unique identifier for resources. I'd consider this expected behavior as hammer doesn't allow changing org id on resources just like UI/API.

If that makes sense, let me know if we can close this out or if you needed some further action on this.

Comment 8 Samir Jha 2023-08-16 15:27:02 UTC
Thanks Shweta,

Closing this based on conversation above.