When attachments are uploaded to incident manually or through Mail to Ticket Automation, the upload date is always blank. Is this an issue or need to do any configurations.
I have figured this issue and had to modify the M ail to Ticket Automation- Combodo mail synchro extension to set Attachment Created date field as now() and user_id as the email sender. Now I am able to see uploaded date and uploaded by successfully.
Thanks
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Karthik,
Can you share with the community how you fixed it, is it similar with my own vision of the possible fix?
My understanding is that the bug is located in MailInboxBase::AddAttachment method.
Setting of the "creation_date", "user_id" and "contact_id" are missing. There isn't always a "userid", as the sender of an email may not have an iTop User.
The fix could be done as this method is available in XML, so can be customized/overwritten with an extension, but Combodo should fix it for all users.
I fixed it in this file of the extension- datamodel.combodo-email-synchro.xml
I used this way as Find Caller was returning Person object instead of User for setting User_id. And I used more than one email because of some testing we have multiple test accounts with same email address(not a proper solution) but query picks the first record. But in production this will not have an issue because each account will have unique email address.
But I got your point on user_id, I need to check on that (what if sender not an itop user). Thanks and will let you know my findings on how it goes.
$oAttachment->Set('creation_date',time());$oCaller=null;$sContactQuery='SELECT User WHERE email = :email';$oSet=newDBObjectSet(DBObjectSearch::FromOQL($sContactQuery),array(),array('email'=>$oEmail->sCallerEmail));if($oSet->Count()>=1){$oCaller=$oSet->Fetch();}$oAttachment->Set('user_id',$oCaller);
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
You are right, if sender is not user we don't get the name under user column in attachments tab. Upon trying to change to set contact_id with your mentioned code. I am getting below error so looks like we may have to change attachment object as well as part of the fix. ERROR occurred during mail processing : Attempting to set the value on the read-only attribute Attachment::contactid
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
In the Attachment class, the contact_id is declared as an External field :-(
So it explains your error message... and the limitation to specify the person who loaded the attachment, when that person has no User
When attachments are uploaded to incident manually or through Mail to Ticket Automation, the upload date is always blank. Is this an issue or need to do any configurations.
Please help.
Regards,
Karthik
Hi All,
I have figured this issue and had to modify the M ail to Ticket Automation- Combodo mail synchro extension to set Attachment Created date field as now() and user_id as the email sender. Now I am able to see uploaded date and uploaded by successfully.
Thanks
Hi Karthik,
Can you share with the community how you fixed it, is it similar with my own vision of the possible fix?
My understanding is that the bug is located in MailInboxBase::AddAttachment method.
Setting of the "creation_date", "user_id" and "contact_id" are missing.
There isn't always a "userid", as the sender of an email may not have an iTop User.
The fix could be done as this method is available in XML, so can be customized/overwritten with an extension, but Combodo should fix it for all users.
Hi Vincent,
I fixed it in this file of the extension- datamodel.combodo-email-synchro.xml
I used this way as Find Caller was returning Person object instead of User for setting User_id. And I used more than one email because of some testing we have multiple test accounts with same email address(not a proper solution) but query picks the first record. But in production this will not have an issue because each account will have unique email address.
But I got your point on user_id, I need to check on that (what if sender not an itop user). Thanks and will let you know my findings on how it goes.
Hi Vincent,
You are right, if sender is not user we don't get the name under user column in attachments tab. Upon trying to change to set contact_id with your mentioned code. I am getting below error so looks like we may have to change attachment object as well as part of the fix.
ERROR occurred during mail processing : Attempting to set the value on the read-only attribute Attachment::contactid
In the Attachment class, the contact_id is declared as an External field :-(
So it explains your error message... and the limitation to specify the person who loaded the attachment, when that person has no User
Combodo internal ref for this problem : N°4081
Hello,
This was fixed in iTop 3.1.1-1 which is now available for download here :)
Take care,
Guillaume