iTop
iTop copied to clipboard
:bug: Fix an exception thrown if 'item_class' has 'org_id' attcode mapped to another attcode not present in Person class
Hello!
If a class from Attachment.item_class has the MapContextParam method that returns an attribute code not present in the Person class, the execution fails on $oCurrentPerson->Get($sAttCode)
with the unknown attribute exception and attachments are not saved.
In my case I faced with the problem in the UserRequest when mapping via MapContextParam the org_id to a newly created provider_org_id. The Person class obviously don't have the provider_org_id attcode but the second MetaModel::IsValidAttCode in the code checks the class from item_class again and not the Person class.