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

Fix #9680 - The related record selected from subpanel edit view is not updated #10638

Open
wants to merge 1 commit into
base: hotfix
Choose a base branch
from

Conversation

SinergiaCRM
Copy link
Contributor

Solves #9680
We closed the #9779 PR addressing this issue after identifying that the relationships in the Activities subpanel were not updating correctly in certain scenarios. To address this, we have refined and improved the solution, which is now presented in this new pill request.

Description

Assign the record indicated in the subpanel form instead of the main record (record from which the subpanel was opened) as they may be different.

We handle the two types of relationships that we have identified as failing so far:

  • Relationships with ID in the _ida field of the relationship different from the parent record
  • Special relationships like member_accounts where parent_id is not equal to parent record ID

We have created this code at the end of the function set_relationship_info(), although due to the fact that we are not experts in the core of SuiteCRM and the existing complexity in relationship management, we have the doubt if the proposed code can be more efficient in another part of the function or of SuiteCRM code

Motivation and Context

Failure to update related field causes data inconsistencies

How To Test This

  1. Create two accounts.
  2. Go to the detail view of the first account and navigate to the Member Organizations subpanel. In the "Member Of" field, select the second account.
  3. Verify that no relationship appears in the subpanel of the first account, as a different organization was selected in the edit form.
  4. Go to the second account and confirm that the subpanel has been updated correctly to reflect the relationship.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Final checklist

  • My code follows the code style of this project found here.
  • My change requires a change to the documentation.
  • I have read the How to Contribute guidelines.

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.

1 participant