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

CO-2675_UnixCluster_plugin_does_not_use_Primary_Name_for_GECOS #576

Open
wants to merge 1 commit into
base: hotfix-4.4.x
Choose a base branch
from

Conversation

ioigoume
Copy link
Contributor

@ioigoume ioigoume commented Feb 5, 2024

No description provided.

@ioigoume ioigoume force-pushed the CO-2675_UnixCluster_plugin_does_not_use_Primary_Name_for_GECOS branch from f983586 to 666b1a3 Compare February 16, 2024 09:36
@ioigoume ioigoume changed the base branch from hotfix-4.3.x to develop February 16, 2024 09:37
@ioigoume ioigoume force-pushed the CO-2675_UnixCluster_plugin_does_not_use_Primary_Name_for_GECOS branch from 666b1a3 to 1fe67e9 Compare March 6, 2024 10:59
@ioigoume ioigoume force-pushed the CO-2675_UnixCluster_plugin_does_not_use_Primary_Name_for_GECOS branch from 1fe67e9 to 3410996 Compare May 8, 2024 08:20
@boshrin
Copy link
Contributor

boshrin commented Jul 15, 2024

I'm confused by the need to change

'CoPersonRole' => array('CoPerson' => 'PrimaryName')

to

'CoPersonRole' => array('CoPerson' => array(
  'PrimaryName' => array('conditions' => array('PrimaryName.primary_name' => true))
))

PrimaryName is defined as a relation on both CoPerson and OrgIdentity so that related queries automatically pick up the conditions necessary to filter on primary_name=true without having to respecify them in each related model. Is something breaking that?

@ioigoume
Copy link
Contributor Author

I'm confused by the need to change

'CoPersonRole' => array('CoPerson' => 'PrimaryName')

to

'CoPersonRole' => array('CoPerson' => array(
  'PrimaryName' => array('conditions' => array('PrimaryName.primary_name' => true))
))

PrimaryName is defined as a relation on both CoPerson and OrgIdentity so that related queries automatically pick up the conditions necessary to filter on primary_name=true without having to respecify them in each related model. Is something breaking that?

This Pull Request is related to PR-539 that has been already merged. I will retest/clean up the fix and follow up on the question/comment

@ioigoume ioigoume force-pushed the CO-2675_UnixCluster_plugin_does_not_use_Primary_Name_for_GECOS branch from 3410996 to dc250d4 Compare January 7, 2025 09:05
@ioigoume ioigoume changed the base branch from develop to hotfix-4.4.x January 7, 2025 09:05
@ioigoume ioigoume force-pushed the CO-2675_UnixCluster_plugin_does_not_use_Primary_Name_for_GECOS branch from dc250d4 to 3276760 Compare January 7, 2025 09:45
@boshrin
Copy link
Contributor

boshrin commented Jan 9, 2025

Ioannis' comment from Slack:

i revisited CO-2675 pull request and the reason why the PrimaryName virtual class does not always work is the contain . If we build a query but do not add our own models in the contain then it works. If we do, it will not. This is why the PR mainly changes the edit/view/delete_contains arrays. It also changes some individual queries that try to filter the records using the PrimaryName. So far, i could not link the issue with the ChangelogBehavior.

So this issue probably isn’t ChangelogBehavior, but something with Containable, which puts us into Cake v2 core, which we probably don’t want to touch if we can avoid it.
This probably falls into the category of “unsatisfying, but not worth the effort to fix”.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants