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

Correctly find the id of related objects in search results #10400

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

Conversation

isleshocky77
Copy link
Contributor

When a search results contain records which have related links in them; the link to the related record does not contain the correct related record id. This causes the link to go to a page with an error message of Error retrieving record. This record may be deleted or you may not be authorized to view it.

NOTE This bug is documented in Pull Request #9823 which seems to only have not been merged due to the formatting of the Pull Request itself.

This issue affects all previous versions of 7.12.x - 7.14.x

Description

  • Spin up a new SuiteCrm installation
  • Go to Administration > Module Builder
  • Create a new Package and Module
  • Add a One-to-Many relation of your new module to Accounts
  • Deploy the package
  • Go to Administration > Search Settings and add your new module
  • Go to the new module
  • Create a new record with a related Account
  • Search for your new record in the global search
  • Click the record link and the account name
  • on master, the record link will go to the record and account name link will 404 when going to the Account module with the record id

search-result-bad-link

Motivation and Context

When searching for a record which has a related record, a user may want to click on the related record. Currently, the user will be shown a link to the related record; however, it will 404 when clicking on it.

How To Test This

  • Spin up a new SuiteCrm installation
  • Go to Administration > Module Builder
  • Create a new Package and Module
  • Add a One-to-Many relation of your new module to Accounts
  • Deploy the package
  • Go to Administration > Search Settings and add your new module
  • Go to the new module
  • Create a new record with a related Account
  • Search for your new record in the global search
  • Click the record link and the account name
  • on master, the record link will go to the record and account name link will 404 when going to the Account module with the record id
  • after this fix, the record link will continue to go to the record and the account name link will go to the Account module using the Account id

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.

@isleshocky77 isleshocky77 force-pushed the fix-search-results-related-object-links branch from ac9e5c0 to f0932f8 Compare April 13, 2024 06:48
@serhiisamko091184 serhiisamko091184 added Status: Requires Code Review Needs the core team to code review Status:Assessed PRs that have been tested and confirmed to resolve an issue by a core team member Branch:Hotfix PR 4-8 Score given to PRs once assessed Area:Search Issues & PRs related to all things regarding Search labels Apr 16, 2024
@serhiisamko091184
Copy link
Contributor

Hello @isleshocky77,

thanks for your contribution to the SuiteCRM project!

Regards,
Serhii

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area:Search Issues & PRs related to all things regarding Search Branch:Hotfix PR 4-8 Score given to PRs once assessed Status:Assessed PRs that have been tested and confirmed to resolve an issue by a core team member Status: Requires Code Review Needs the core team to code review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants