<div dir="ltr">This was noted down in <a href="http://trac.vtiger.com/cgi-bin/trac.cgi/ticket/8153">http://trac.vtiger.com/cgi-bin/trac.cgi/ticket/8153</a></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Jul 16, 2014 at 3:02 PM, Holbok István <span dir="ltr"><<a href="mailto:holbok@gmail.com" target="_blank">holbok@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  

    
  
  <div text="#000000" bgcolor="#FFFFFF">
    Dear Vtiger Team,<br>
    <br>
    I have found a <b>bug </b>in the vtiger 6.1 SVN 14164.<br>
    The bug is related to the issue mentioned my letter of 14, July,
    here is below with screenshoots, and easy to handle.<br>
    <br>
    The ModTracker should not be notify the change in the field of <b>Modified
      Time</b>, and the Created Time also should be displayed right in
    any Custom module.<br>
    <br>
    The cause of the issue is a very simply and stupid thing.<br>
    <br>
    Here is the sample code of the creation entity module, form the
    page:<br>
<a href="http://community.vtiger.com/help/vtigercrm/developers/extensions/examples/entity-module.html" target="_blank">http://community.vtiger.com/help/vtigercrm/developers/extensions/examples/entity-module.html</a><br>
            $mfield3 = new Vtiger_Field();<br>
            $mfield3->name = 'ModifiedTime';<br>
            $mfield3->label= 'Modified Time';<br>
            $mfield3->table = 'vtiger_crmentity';<br>
            $mfield3->column = 'modifiedtime';<br>
            $mfield3->uitype = 70;<br>
            $mfield3->typeofdata = 'T~O';<br>
            $mfield3->displaytype= 2;<br>
            $block->addField($mfield3);<br>
    <br>
    The field name 'ModifiedTime' uses <b>uppercase </b>and <b>lowercase
    </b>letters also. For the SQL is indifferent because the SQL is case
    <b>insensitive </b>relating to the field names or table names.<br>
    But the array keys are case sensitive things in PHP.<br>
    Ref.: <a href="http://php.net/manual/en/function.array-key-exists.php" target="_blank">http://php.net/manual/en/function.array-key-exists.php</a> (look
    at the comments) or look at this post<br>
<a href="http://stackoverflow.com/questions/1511230/php-array-are-array-indexes-case-sensitive" target="_blank">http://stackoverflow.com/questions/1511230/php-array-are-array-indexes-case-sensitive</a><br>
    <br>
    So, using the field name 'ModifiedTime' and 'modifiedtime' are two
    different things for the handling programs.<br>
    <br>
    <b>.../modules/ModTracker/ModTrackerHandler.php will fail in the
      line 33-34 due to the uppercase / lowercase confusion.</b><br>
                        foreach($delta as $fieldName => $values) {<br>
                            if($fieldName != 'modifiedtime') {<br>
    <br>
    Perhaps many of the Custom modules uses the field name
    'ModifiedTime' (as it was suggested in the sample code) and the
    tabid=34, PBXManager also uses in the table vtiger_field uppercase /
    lowercase name.<br>
    <br>
    <b>Solution:</b><br>
    <b>(1) Using lowercase field names in all vtiger consequently. It is
      the most easiest way to repair code.</b><b> It is may suggestion.</b><br>
    <br>
    <br>
    (2) Using lowercase conversion in every place where SQL field names
    are appearing as an array key. It is quite difficult to check all
    the code and change all appearances.<br>
    <br>
    Affected standard modules:<br>
    PBXManager<br>
    <br>
    An other question to this issue, with Type of Data:<br>
     $mfield3->typeofdata = 'T~O';<br>
    <br>
    Here is T~O in the sample code.<br>
    Looking the table vtiger_field inside, all other fields
    'modifiedtime' have typeofdata= DT~O.<br>
    <br>
    Is it a typo or intentionally was changed the typeofdata in the
    sample code?<br>
    <br>
    The above mentioned issue with both side (field name and 
    typeofdata) is valid for the other system field '<b>CreatedTime</b>'
    / '<b>createdtime</b>' also <br>
    <br>
    Kindest regards:<br>
    Istvan<br>
    <div><br>
      <br>
      -------- Eredeti üzenet --------
      <table border="0" cellpadding="0" cellspacing="0">
        <tbody>
          <tr>
            <th nowrap valign="BASELINE" align="RIGHT">Tárgy: </th>
            <td>Strange behavior of ModTracker in a Custom module vtiger
              6.1</td>
          </tr>
          <tr>
            <th nowrap valign="BASELINE" align="RIGHT">Dátum: </th>
            <td>Mon, 14 Jul 2014 15:45:14 +0200</td>
          </tr>
        </tbody>
      </table>
      <br>
      <br>
      
      Dear Vtiger Community,<br>
      <br>
      There is a strange behavior of ModTracker in a Custom module
      vtiger 6.1 module record summary view.<br>
      Here is the Modtracker data in Contacts module, with right data:<br>
      <img alt="" src="cid:part1.05080004.01020108@gmail.com" height="541" width="1299"><br>
      <br>
      And here is the Modtracker data in my Custom module with totally
      strange data show:<br>
      <img alt="" src="cid:part2.09080708.05040505@gmail.com" height="692" width="1335"><br>
      <br>
      Is there any idea what is the cause of it?<br>
      <br>
      Kindest regards:<br>
      István<span class="HOEnZb"><font color="#888888"><br>
      <br>
      <br>
      <br>
      <div>-- <br>
        üdvözlettel:<br>
        <br>
        <b>Holbok István</b><br>
        <br>
        +3670-342-0900<br>
        <b>e-mail:</b> <a href="mailto:holbok@gmail.com" target="_blank">holbok@gmail.com</a><br>
        <b>SkyPe:</b> holboki<br>
        <br>
      </div>
      <br>
    </font></span></div>
    <br>
    <br>
  </div>

<br>_______________________________________________<br>
<a href="http://www.vtiger.com/" target="_blank">http://www.vtiger.com/</a><br></blockquote></div><br></div>