Skip to content
Snippets Groups Projects
Commit bfaf4863 authored by Alan Bell's avatar Alan Bell
Browse files

fix #221 use assigned_user_id in preference to other users UItype 10 fields

parent 675bee77
No related branches found
No related tags found
No related merge requests found
......@@ -550,7 +550,12 @@ class QueryGenerator {
}
$ownerFields = $this->meta->getOwnerFields();
if (count($ownerFields) > 0) {
$ownerField = $ownerFields[0];
//there are more than one field pointing to the users table, the real one is the one called assigned_user_id if there is one, otherwise pick the first
if(in_array("assigned_user_id",$ownerFields)){
$ownerField="assigned_user_id";
}else{
$ownerField = $ownerFields[0];
}
}
$baseTable = $this->meta->getEntityBaseTable();
$sql = " FROM $baseTable ";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment