<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p><font size="4">Hi Alan,</font></p>
<p><font size="4">sure, we can collaborate on this task. At the
moment we are very busy, but in the next days we can start this
activity.</font></p>
<p><font size="4">We have to discuss which features we want to
include in the VT core. Do we want to discuss here or on a issue
on gitlab?</font></p>
<p><font size="4">Bye for now</font></p>
<p><font size="4">Vincenzo<br>
</font></p>
<p><font size="4"><br>
</font></p>
<p><font size="4"><br>
</font></p>
<div class="moz-cite-prefix">Il 17/07/25 10:21, Alan Lord ha
scritto:<br>
</div>
<blockquote type="cite" cite="mid:105abpg$d3k$1@ciao.gmane.io">Thanks
for the follow up Vincenzo,
<br>
<br>
Can we not collaborate on a project in Gitlab to get a merge
request ready for proper testing?
<br>
<br>
As for your last comment about related fields, in the Cloud CRM
they do clear the related fields. I just deleted an organisation
that was in the Contact's Organisation field and the field was
cleared. When I restore the record, the field is re-populated.
<br>
<br>
I assumed that was was all stored in the "vtiger_relatedlists_rb"
table but even though it is referenced in CRMEntity (see
unlinkDependencies method) it never seems to have any data in
it...
<br>
<br>
Cheers
<br>
<br>
Al
<br>
<br>
<br>
On 16/07/2025 15:11, Vincenzo Bruno wrote:
<br>
<blockquote type="cite">The issue with*"orphan" entities*is a
significant one in*Vtiger*.
<br>
<br>
The core framework does*not*check related entities, leaving
them*orphaned*when deleting or*unlinking*the parent.
<br>
<br>
For example, deleting a*Project*leaves its*Project
Tasks*orphaned. The same applies to its*comments, documents,
activities, etc.*
<br>
<br>
We implemented a*workaround*for this with a*custom handler*that
catches| beforedelete|and|beforeunrelate|events. If entities are
related via a*mandatory field*,
then*delete*and*unrelate*operations are*blocked*. In the
previous example, the*Project*field in*Project Task*entities is
mandatory, so deleting a*Project*with at least*one task*is
prevented.
<br>
<br>
The next step is to*enable forced deletion*by adding a*"delete
on cascade"*checkbox. However, we are concerned about
potential*circular dependencies*in custom modules or complex
entity configurations.
<br>
<br>
All of this*functionality*should be added to*Vtiger's core*and
should*at least*work in*core modules*. Our current code is
a*"quick & dirty"*solution that works for us, but it
needs*cleanup and generalization*before being submitted as
a*Merge Request (MR)*.
<br>
<br>
Moreover, there is another issue with the*Recycle Bin*when
activated:
<br>
<br>
*
<br>
<br>
Deleting a parent entity marks it as*deleted*, but*related
fields
<br>
are not cleared*until the Recycle Bin is emptied.
<br>
<br>
*
<br>
<br>
For example, in*Projects*, you still see a*link to the
deleted
<br>
Project*in a*Task*, but clicking on it throws an error.
<br>
<br>
<br>
<br>
<br>
<br>
<br>
Il 16/07/25 11:31, Alan Lord ha scritto:
<br>
<blockquote type="cite">Anyone got any thoughts on cleaning the
crmentityrel table?
<br>
<br>
I think maybe this would be better to include in the delete
code in the recycle bin model, e.g.
<br>
<br>
"DELETE FROM vtiger_crmentityrel WHERE (module = ? AND crmid =
?) OR (relmodule = ? AND relcrmid = ?)"
<br>
<br>
Are there any potential issues with removing rows from this
table? Otherwise it is just going to keep on growing as far as
I can tell...
<br>
<br>
But then we get into the others too: seactivityrel,
<br>
<br>
Cheers
<br>
<br>
Al
<br>
</blockquote>
</blockquote>
<br>
_______________________________________________
<br>
<a class="moz-txt-link-freetext" href="http://www.vtiger.com/">http://www.vtiger.com/</a>
<br>
</blockquote>
<pre class="moz-signature" cols="72">--
Vincenzo Bruno
Coopyleft - <a class="moz-txt-link-abbreviated" href="http://www.coopyleft.it">www.coopyleft.it</a>
tel: 3287252923
Digital Polis (<a class="moz-txt-link-abbreviated" href="http://www.digitalpolis.it">www.digitalpolis.it</a>)
Hacklab Cosenza (<a class="moz-txt-link-abbreviated" href="http://www.hlcs.it">www.hlcs.it</a>)
</pre>
</body>
</html>