Welcome to ProjeQtOr new Forum. We migrated old forum to the new website.
You will find all your posts here, with your usual account.
Just one point : you’ll have to reinitialize your password. Use “Lost password” feature.
Could you please explain me the exact meaning ad usage of fields
idResourceSelect
idResource
idContact
idUser
Obviously idContact is used when a contact is affected, but I'm not able to understand usage and meaning of other fields.
And what about code
if (SqlList::getNameFromId('Resource', $this->idResource) == $this->idResource) {
$this->idResource = null;
}
in Affectation construct method ?
Thank you for your attention
idResource is always set.
It is the id in the table resource, whatever the personn is a resource, a user or a constact.
If personn allocated is a contact, idContact is set.
If personn allocated is a user, idUser is set.
If personn allocated is a resource, idResourceSelect is set.
(it is historical that idResource is the always set field, so we had to rename idResourceSelect for selected resource)
if (SqlList::getNameFromId('Resource', $this->idResource) == $this->idResource) {
$this->idResource = null;
}
This wa shistorically used to reset idResource if it's not a resource. It will be re-calculated on control() function.
But the method SqlList::getNameFromId returns the name of the resource, that cannot be compared with the id .
If id is returned , it means name has not been found 😉