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 - Search user in where propal and order #29374

Merged
merged 9 commits into from Apr 28, 2024

Conversation

BB2A-Anthony
Copy link
Contributor

@BB2A-Anthony BB2A-Anthony commented Apr 17, 2024

FIX|Fix #[Search user in where]

[Long description]

@@ -868,8 +868,10 @@
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."projet as p ON p.rowid = c.fk_projet";
$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'user as u ON c.fk_user_author = u.rowid';
if ($search_user > 0) {
$sql .= ", ".MAIN_DB_PREFIX."element_contact as ec";
$sql .= ", ".MAIN_DB_PREFIX."c_type_contact as tc";
$sql .= " INNER JOIN ".MAIN_DB_PREFIX."element_contact as ec";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We must abandon the use of join to make filter on data that is not part of the main table. We must instead have all the logic of the filter into the WHERE with IN (subselect)

@eldy eldy added the PR to fix or conflict to solve PR needs to be fixed to be integrated (except for conflicts, a comment describes the fix to do) label Apr 17, 2024
Copy link
Contributor Author

@BB2A-Anthony BB2A-Anthony left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We must abandon the use of join to make filter on data that is not part of the main table. We must instead have all the logic of the filter into the WHERE with IN (subselect)

@eldy it's done

@BB2A-Anthony BB2A-Anthony changed the title FIX - INNER JOIN for search user FIX - Search user in where propal and order Apr 18, 2024
@eldy eldy merged commit fffa30f into Dolibarr:develop Apr 28, 2024
5 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR to fix or conflict to solve PR needs to be fixed to be integrated (except for conflicts, a comment describes the fix to do)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants